iOS Question [SOLVED] B4XDrawer autoscale issue.

Discussion in 'iOS Questions' started by techknight, May 22, 2019.

  1. techknight

    techknight Well-Known Member Licensed User

    I am using B4XDrawer in my app which worked fine with my simple layout without any major issues.

    But, With my more complex layout, I am getting scaling issues.

    If the layout is open in B4i-Bridge, it looks ok. seems to be scaled ok.

    But when I load it in B4X drawer in my App, its all oversized and jumbled layered on top of one other and I cant quite figure out whats going on with it. Android everything works fine, but I know iOS is different.

    I am using an iPad Mini which it looks decently ok on, and an older iPod touch which seems to be the biggest issue, that and phones.

    Here is my Application Start code, and I attached the layout file.

    Code:
    Private Sub Application_Start (Nav As NavigationController)
        NavControl = Nav
        SetNavColors(
    0xFF0098FF)
        SetTitleColor(Nav, 
    Colors.White)
        Page1.Initialize(
    "Page1")
        Page1.RootPanel.LoadLayout(
    "RootPanel")
        Page1.RootPanel.SetBorder(
    000)
        Page1.RootPanel.Color = 
    Colors.Black
        Page1.Title = 
    "Football Scorekeeper" & Common.AppVersion
        Drawer.Initialize(Me, 
    "drawer", pnlRoot, 275dip)
        
    'SwitchPage(1)
        Drawer.CenterPanel.LoadLayout("fblarge")
        Drawer.LeftPanel.LoadLayout(
    "left")
        NavControl.ShowPage(Page1)
        NavControl.ToolBarVisible = 
    False
        NavControl.NavigationBarVisible = 
    True
        
    Dim bb As BarButton
        bb.InitializeBitmap(KeepOriginalColors(LoadBitmapResize(
    File.DirAssets, "hamburger.png"32dip32dipTrue)), "hamburger")
        Page1.TopLeftButtons = 
    Array(bb)
        SetMenuItems(
    False0)

        
    'Build Left Menu Items
        BuildLeftMenu
     
        
    'Declare Fonts
        lblGuest.Font = Font.CreateNew2("Digital-7"30)
        lblHome.Font = 
    Font.CreateNew2("Digital-7",30)
        lblPeriod.Font = 
    Font.CreateNew2("Digital-7",30)
        lblTime.Font = 
    Font.CreateNew2("Digital-7",36)
        ScoreEngine.TimeOfDay = 
    False

        
    'Load Dialogs
        dialog.Initialize(Page1.RootPanel)
    '    dialog.Title = "Input Dialog Example"
     
        
    'Read in the game save configuration file
        CheckConfig
        ReadConfig

        
    'Keep the device alive
        App.IdleTimerDisabled = True

    End Sub
    Any thoughts?
     
    Last edited: May 22, 2019
  2. techknight

    techknight Well-Known Member Licensed User

    The issue was the pnlRoot from the Iphone X safe area example, I had to fix the autoscale rate and variant on that to match that of my main layout and all is well.
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice