Code to show a page with transparent background (or Alpha).
That means that the page under will be visible.
You need to change the NewPage background color to transparent or any alpha to see the effect.
You can change a lot of Styles.
Narek
That means that the page under will be visible.
You need to change the NewPage background color to transparent or any alpha to see the effect.
B4X:
Private Sub ShowPage(Parent as Page, NewPage as Page)
Dim no As NativeObject = Parent
Dim no2 As NativeObject=NewPage
no2.SetField("ModalTransitionStyle",0) 'You can change the animations style by changeing the 0 to 1,2,...
no.SetField("providesPresentationContextTransitionStyle",True)
no.SetField("definesPresentationContext",True)
no2.SetField("ModalPresentationStyle",5) ' You can change the mode by changing the 5 to 6,7,..
no.RunMethod("presentModalViewController:animated:",Array(NewPage,True))
' you can disable the animation by setting false
End Sub
Private Sub HidePage(Parent as Page)
Dim no As NativeObject=Parent
no.RunMethod("dismissViewControllerAnimated:completion:",Array(True,Null))
'you can disable the animation by setting false
End Sub
You can change a lot of Styles.
Narek