iOS Question presentModalViewController annoying small bar remains on the top

Mike1970

Well-Known Member
Licensed User
Longtime User
Hi everyone, I followed this post in order to achieve that famous iOS bottom sheet layout.
It worked but the annoying thing is that when I load the layout in it, the top part of the view remains empty, like if the Top=0 is Top=20.

I attach a screenshot to make it more understandable
(my problem is the part that is circled with red, right under there is the white panel that in the designer I put at the top (whitepanel.top = 0))


Edit: I noticed on iPhone6 that the height of that area is the same as the StatusBar..

IMG_2003.jpg


the code I used to load everything:

B4X:
Sub Button_Click
   Dim QRpazientePg As Page
   QRpazientePg.Initialize("QRpazientePg")
   QRpazientePg.RootPanel.LoadLayout("QRpaziente_layout")

   Try
      imgQrPres.Bitmap = CreateQRcode($"${cd.CodiceRegione},${cd.CodiceRicetta},${cd.CodiceFiscale}"$)
   Catch
      Log(LastException)
   End Try

   PresentPage(Main.NavControl, QRpazientePg)
End Sub

Sub PresentPage(Parent As Page, dialog As Page)
   Dim no As NativeObject = dialog
   no.SetField("modalTransitionStyle", 0)

   Dim no2 As NativeObject = Parent
   no2.RunMethod("presentModalViewController:animated:", Array(dialog, True))
End Sub
 
Last edited:
Top