iOS Question Show second page like popup animation

Keith Yong

Active Member
Licensed User
Longtime User
May need to get some advice from expert, how do I display the second page like popup style instead of showing the next page from right to left? Here is some example from xcode. Thanks in advance!

 

Erel

B4X founder
Staff member
Licensed User
Longtime User
This is the important code:
B4X:
Sub btnPresent_Click
   PresentPage(Page1, page2)
End Sub

Sub btnDismiss_Click
   DismissPage(Page1)
End Sub

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

'Pass the parent page!
Public Sub DismissPage(Parent As Page)
   Dim no As NativeObject = Parent
   no.RunMethod("dismissViewControllerAnimated:completion:", Array(True, Null))   
End Sub

See the attached project.
 

Attachments

  • PresentPage.zip
    3.3 KB · Views: 249
Upvote 0

Keith Yong

Active Member
Licensed User
Longtime User
This is the important code:
B4X:
Sub btnPresent_Click
   PresentPage(Page1, page2)
End Sub

Sub btnDismiss_Click
   DismissPage(Page1)
End Sub

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

'Pass the parent page!
Public Sub DismissPage(Parent As Page)
   Dim no As NativeObject = Parent
   no.RunMethod("dismissViewControllerAnimated:completion:", Array(True, Null))  
End Sub

See the attached project.


Fantastic!!!!
 
Upvote 0
Top