iOS Question B4XPages - navigation bar

luke2012

Well-Known Member
Licensed User
Longtime User
Hi All,
I state that I am not very familiar with the B4XPages framework (by @Erel) because it is my first B4XPages app that I am developing (and so I'm learning as I develop).

The problem I am having is that the navigation bar of the first page ("Home") does not appear within iOS versione of the app (see attached pic), while within the Android version it appears.

The relevant B4X code is the same (shared) between B4A and B4i but in the iOS version the navigation bar does not appear.
Maybe I'm forgetting something related to the iOS platform not related to code?

Main (B4i):
'Code module
#Region  Project Attributes
    #ApplicationLabel: MyApp
    #Version: 0.9.8
    'Orientation possible values: Portrait, LandscapeLeft, LandscapeRight and PortraitUpsideDown
    '#iPhoneOrientations: Portrait, LandscapeLeft, LandscapeRight
    #iPhoneOrientations: Portrait
    '#iPadOrientations: Portrait, LandscapeLeft, LandscapeRight, PortraitUpsideDown
    '#Target: iPhone, iPad
    #Target: iPhone
    #ATSEnabled: True
    #MinVersion: 8
    'QueriesSchemes definition
    #QueriesSchemes : whatsapp
    #QueriesSchemes: tel
    #QueriesSchemes: telprompt
    'UrlScheme definition
    '#UrlScheme: comgooglemaps
#End Region

Sub Process_Globals
    Public App As Application
    Public NavControl As NavigationController
   
    'AppGlobals (module shared vars, consts and objs)
    Public AppGlobals As clsGlobals
End Sub

Private Sub Application_Start (Nav As NavigationController)
    NavControl = Nav
    Dim PagesManager As B4XPagesManager
    PagesManager.Initialize(NavControl)
   
    'LOGGING SWITCH
    B4XPages.GetManager.LogEvents = False
   
    'AppGlobals
    AppGlobals.Initialize
    B4XPages.GlobalContext = AppGlobals
End Sub

'Template version: B4i-1.0
#Region Delegates
Private Sub Application_Background
    B4XPages.Delegate.Activity_Pause
End Sub

Private Sub Application_Foreground
    B4XPages.Delegate.Activity_Resume
End Sub
#End Region


B4XMainPage:
'This event will be called once, before the page becomes visible.
Private Sub B4XPage_Created (Root1 As B4XView)
    B4XPages.GetManager.TransitionAnimationDuration = 0
 
    'B4XPages
    Root = Root1
    Root.LoadLayout("splash")
    'B4XPages.SetTitle(Me, "Benvenuto in " & Application.LabelName)
    B4XPages.SetTitle(Me, "My Client Name")
 
    'App Home
    AppHome.Initialize
    B4XPages.AddPage("AppHome", AppHome)
 
    B4XGifView1.SetGif(File.DirAssets, "splash_anim.gif")
    tmrSplashAnim.Enabled = True

End Sub

Private Sub tmrSplashAnim_Tick
    tmrSplashAnim.Enabled = False
    pnSplashAnim.Visible = False
 
    B4XPages.ShowPageAndRemovePreviousPages("AppHome")
End Sub

Home (B4XPages page):
Private Sub B4XPage_Created (Root1 As B4XView)
    Root = Root1
    Root.LoadLayout("home")
    B4XPages.SetTitle(Me, "Home")
 
    '.......
End Sub
 

Attachments

  • Schermata 2021-11-20 alle 09.25.28.png
    318.3 KB · Views: 234
Last edited:

Alexander Stolte

Expert
Licensed User
Longtime User
read this thread:
 
Upvote 0

luke2012

Well-Known Member
Licensed User
Longtime User

Attachments

  • Schermata 2021-11-20 alle 17.33.35.png
    360.5 KB · Views: 198
Upvote 0

luke2012

Well-Known Member
Licensed User
Longtime User
Referring to the attached screens (each screen is a new B4XPage opened by the previous page) I notice that on the iOS version (on the left) the word "Back" appears before the arrow while on the Android version only the arrow icon appears. About this, the strange thing is that only within the first opened page is "Home" instead of "Back".

Since the bar is localized in Italian, I would like to hide the word Back or replace it with the Italian translation but how to do it using B4XPages ? I see that the only method (B4XPages) that affects the top bar settings is .SetTitle (). Correct me if I'm wrong.

B4X - B4XPages code shared between B4A and B4i:
    Root = Root1
    Root.LoadLayout("home")
    B4XPages.SetTitle(Me, "Home")

    Root = Root1
    Root.LoadLayout("MainCats")
    B4XPages.SetTitle (Me, "Scegli una categoria...")

    Root = Root1
    Root.LoadLayout("subcatslist")
    B4XPages.SetTitle (Me, "Cosa cerchi ?")
  
    Root = Root1
    Root.LoadLayout("CardList")
    B4XPages.SetTitle (Me, "Le attività per te")




 

Attachments

  • 1637427229612.png
    326 bytes · Views: 186
Upvote 0

Alexander Stolte

Expert
Licensed User
Longtime User
Since the bar is localized in Italian, I would like to hide the word Back or replace it with the Italian translation but how to do it using B4XPages ?
It's best to open a new thread for this. For people who are looking for it in the future will thank you.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…