iOS Question Change App.KeyController

mkh_fx

Member
Licensed User
Longtime User
hi everyone
in my first Layout i have used TabBarController
i change the KeyController by this code
B4X:
Sub pnl_category_Click
    Main.App.KeyController = Main.NavControl
    frm_showcategory.Show
End Sub

But when I do change the black screen to be displayed
this my code in frm_showcategory.show
B4X:
Public Sub Show
        page_showCategory.Initialize("frm_showcategory")      
        page_showCategory.RootPanel.LoadLayout("frm_showcategory_sv")
        main_sv.Panel.LoadLayout("frm_showcategory")
        Main.NavControl.NavigationBarVisible  =True
        Main.NavControl.ShowPage(page_showCategory)

End Sub
 

Attachments

  • first.jpg
    first.jpg
    53.7 KB · Views: 210
  • next.png
    next.png
    3.3 KB · Views: 216

mkh_fx

Member
Licensed User
Longtime User
thanks Erel
i change my code but not solved my problem
B4X:
Public Sub Show
    If (page_showCategory.IsInitialized = False) Then
        page_showCategory.Initialize("frm_showcategory")       
        main_sv.Panel.LoadLayout("frm_showcategory")
        Main.NavControl.ShowPage(page_showCategory)
        page_showCategory.RootPanel.LoadLayout("frm_showcategory_sv")
     End If
End sub

when i use below code my layout displayed correctly but RemoveCurrentPage not work
B4X:
Sub Process_Globals
    Dim nv As NavigationController
End Sub
Public Sub Show
    If (page_showCategory.IsInitialized = False) Then
        nv.Initialize("nv")       
        Main.App.KeyController = nv
        Main.NavControl = nv
        page_showCategory.Initialize("frm_showcategory")       
        main_sv.Panel.LoadLayout("frm_showcategory")
        Main.NavControl.ShowPage(page_showCategory)
        page_showCategory.RootPanel.LoadLayout("frm_showcategory_sv")
     End If
End sub

Sub btn_back_Click
    nv.RemoveCurrentPage
    Main.NavControl.RemoveCurrentPage   
End Sub
 
Upvote 0
Top