iOS Question PageViewController and ToolBarVisible

MarcoRome

Expert
Licensed User
Longtime User
Hi All.
If i have this code:

Code: Copy
Private Sub Application_Start (Nav As NavigationController)
   Page1.Initialize("Page1")
   Page1.RootPanel.LoadLayout("Layout1")
   Page2.Initialize("Page2")
   Page2.RootPanel.LoadLayout("Layout2")
   Page3.Initialize("Page3")
   Page3.RootPanel.LoadLayout("Layout3")
   PVC.Initialize("pvc", Array(Page1, Page2, Page3))
   App.KeyController = PVC
End Sub

it possible set ToolBarVisible = True ?
Thanks
 
Try This Marco,

In your Process_Globals put
Code: Copy
Public NavControl As NavigationController

Then in your Application_Start put
Code: Copy
NavControl = Nav
Nav.ToolBarVisible = True

Should do the Trick
 
Upvote 0
Hi Erel, thank you for your reply. I have this code:

Code: Copy
Sub Process_Globals
    'These global variables will be declared once when the application starts.
    'Public variables can be accessed from all modules.
    Public App As Application
    Private Page1, Page2, Page3 As Page
    Private PVC As PageViewController
    Public NavControl As NavigationController
End Sub

Private Sub Application_Start (Nav As NavigationController)
    Page1.Initialize("Page1")
    Page1.RootPanel.LoadLayout("Layout1")
    Page2.Initialize("Page2")
    Page2.RootPanel.LoadLayout("Layout2")
    Page3.Initialize("Page3")
    Page3.RootPanel.LoadLayout("Layout3")
    PVC.Initialize("pvc", Array(Page1, Page2, Page3))
    App.KeyController = PVC

    NavControl = Nav
    Nav.ToolBarVisible = True
  
End Sub

Private Sub Page1_Appear
    Log("Page 1 is visible")
End Sub
Private Sub Page2_Appear
    Log("Page 2 is visible")
End Sub
Private Sub Page3_Appear
    Log("Page 3 is visible")
End Sub
Private Sub Page1_Resize(Width As Int, Height As Int)
  
End Sub

Private Sub Application_Background
  
End Sub

and in Design ( layout1) i have this:

upload_2018-3-4_17-37-34.png


in preview i see this:

IMG_0013.PNG


When run App i see this:

IMG_0014.PNG
 
Upvote 0
Upvote 0
Back
Top