hi, i saw this post that show partially how to show the new dialog style from Apple.
The only problem is that, even if i had some top/right buttons to the page displayed as dialog, they aren't disaplayed because i think there isn't the navigation bar in that page.
Where i add the button (taken from this example)
Attempt one:
The shape is this one.. but no top button showed, i think something is missing
Attempt two:
this is the result from the Erel answer, for the missing of top control (if there is not layout) i can't even close this page (dialog).
What i'm looking for:
(this has the left button cancel in other cases there is also a sort of title)
The only problem is that, even if i had some top/right buttons to the page displayed as dialog, they aren't disaplayed because i think there isn't the navigation bar in that page.
Where i add the button (taken from this example)
B4X:
Private Sub Application_Start (Nav As NavigationController)
NavControl = Nav
Page1.Initialize("Page1")
Page1.Title = "Page 1"
Page1.RootPanel.Color = Colors.Yellow
page2.Initialize("Page2")
page2.Title = "Page 2"
page2.RootPanel.Color = Colors.Cyan
NavControl.ShowPage(Page1)
Page1.TopRightButtons = Array( _
CreateFABarButton(Chr(0xF054), "right") _
,CreateFABarButton(Chr(0xF053), "left") _
,CreateFABarButton(Chr(0xF00C), "v") _
,CreateFABarButton(Chr(0xF00D), "x"))
End Sub
Attempt one:
B4X:
Sub PresentPage2(Parent As Page, dialog As Page)
Dim no As NativeObject = dialog
no.SetField("modalTransitionStyle",0)
'no.SetField("modalPresentationStyle",0)
Dim no2 As NativeObject = Parent
no2.RunMethod("presentModalViewController:animated:", Array(dialog, True))
End Sub
The shape is this one.. but no top button showed, i think something is missing
Attempt two:
B4X:
Sub PresentPage2(Parent As Page, dialog As Page)
Dim no As NativeObject = dialog
no.SetField("modalTransitionStyle",0)
no.SetField("modalPresentationStyle",0)
Dim no2 As NativeObject = Parent
no2.RunMethod("presentModalViewController:animated:", Array(dialog, True))
End Sub
this is the result from the Erel answer, for the missing of top control (if there is not layout) i can't even close this page (dialog).
What i'm looking for:
(this has the left button cancel in other cases there is also a sort of title)