iOS Question White bar on iPhone Xs

Discussion in 'iOS Questions' started by schimanski, Jul 10, 2019.

  1. schimanski

    schimanski Well-Known Member Licensed User

    Does anybody know, why the tabstrip shows a white bar under the pages on iPhone Xs? This doesn't happens on iPhone 8:

    iphone xs.PNG

    iphone 8.PNG
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    Is the table anchored vertically to both sides?
     
  3. schimanski

    schimanski Well-Known Member Licensed User

    I'm adding the table to the pages with the following code. The bar is only shown in portrait, not in landscape-mode:
    Code:
    for i=1 to Count
       
    tabpage(i).Initialize("tabpage" & i)  
       
    tabpage(i).Title = Name(i)
       table(i).Initialize(Me, 
    "Table" & i, 8)
       table(i).AddToParent(
    tabpage(i).RootPanel, 00,100%x100%y)
    ..
    next
     
  4. Erel

    Erel Administrator Staff Member Licensed User

    Please try to reproduce it in a small project and upload it.
     
  5. schimanski

    schimanski Well-Known Member Licensed User

    I will try to make a short project. For this moment, there is also a behavior, that can help: On IPhone 8, the white bar also exists, when the iphone shows some informations like number of devices which are connected to the hotspot in the blue statusbar on top.
     
  6. schimanski

    schimanski Well-Known Member Licensed User

    Here a small project of my app.

    Thanks for help!
     

    Attached Files:

  7. Erel

    Erel Administrator Staff Member Licensed User

    I see it as well. It looks like a limitation of the underlying library related to devices with notch.

    This code should fix it:
    Code:
    Sub MainPage_Resize (Width As Float, Height As Float)
       
    If TabStrip1.IsInitialized And App.OSVersion >= 11 Then
           
    Dim no As NativeObject = TabStrip1
           
    Dim window As NativeObject = App
           window = window.GetField(
    "keyWindow")
           
    Dim f() As Float = window.ArrayFromEdgeInsets(window.RunMethod("safeAreaInsets"Null))
           
    If f(1) > 0 Then
               
    Dim Container As View = no.GetField("containerView")
               Sleep(
    50)
               
    Dim PrevTop As Int = Container.Top
               Container.Top = 
    44 - f(1)
               Container.Height = Container.Height + PrevTop - Container.top
           
    End If
       
    End If
    End Sub
     
    techknight, angel_ and Johan Hormaza like this.
  8. schimanski

    schimanski Well-Known Member Licensed User

    Works perfect. Thank you very much!
     
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