iOS Question Page over TabBar

narek adonts

Well-Known Member
Licensed User

Erel

Administrator
Staff member
Licensed User
You can show a dialog page with this code:
B4X:
Sub Process_Globals
   Public App As Application
   Public NavControl As NavigationController
   Private Page1 As Page
   Private DialogPage As Page
End Sub

Private Sub Application_Start (Nav As NavigationController)
   NavControl = Nav
   Page1.Initialize("Page1")
   Page1.RootPanel.Color = Colors.Green
   NavControl.ShowPage(Page1)
   DialogPage.Initialize("DialogPage")
   DialogPage.RootPanel.Color = Colors.Red
End Sub

Sub Page1_Click
   PresentPage(Page1, DialogPage)
End Sub

Sub DialogPage_Click
   DismissPage(Page1)
End Sub

Sub PresentPage(Parent As Page, dialog As Page)
   Dim no As NativeObject = Parent
   no.RunMethod("presentViewController:animated:completion:", Array(dialog, True, Null))
End Sub
Sub DismissPage(Parent As Page)
   Dim no As NativeObject = Parent
   no.RunMethod("dismissViewControllerAnimated:completion:", Array(True, Null))
End Sub
 

narek adonts

Well-Known Member
Licensed User
why this code is not working?

B4X:
Sub PresentPage(Parent As Page, dialog As Page)
   Dim no As NativeObject = Parent
  no.SetField("ModalTransitionStyle","UIModalTransitionStyleFlipHorizontal")
  no.RunMethod("presentModalViewController:animated:", Array(dialog, True))


End Sub
The view is shown but I am not able to change the transition style.

Narek
 

ilan

Expert
Licensed User
i know its an old thread but maybe someone is interested :)

B4X:
Sub PresentPage2(Parent As Page, dialog As Page)
  Dim no As NativeObject = dialog
  no.SetField("modalTransitionStyle",1)

  Dim no2 As NativeObject = Parent
  no2.RunMethod("presentModalViewController:animated:", Array(dialog, True))
End Sub
flip.gif
 
Top