iOS Question TabStrip error lower than version 12

Similar threads

B4i Library TabStrip
B4i Tutorial Multiple Pages Example
B4i Tutorial iPhone X Safe Area
B4A Library [B4X] [XUI] Page Indicator
B4J Code Snippet [B4X] [BitmapCreator] Layout implode animation

yiankos1

Active Member
Licensed User
Hello my friends,
I have a strange error reported by a user. Tabstrip causes an error on devices lower than version 12. I have a devices that running at 12.4.1 but i can't reproduce this error in order to have a log file. I use apptize.io in order to reproduce it, indeed it closes my app if tabstrip is shown. So, i built tabstrip lib's example and uploaded at apptize. No error at all. I can't figure out what is the diferrence between lib's example and my project's tabstrip. Tabstrip is loaded through designer.
My code:
B4X:
Public Sub Show
  
    pgVathmologia.Initialize("pgVathmologia")
    pgVathmologia.RootPanel.LoadLayout("main") 'this is the layout about iphoneX safe zones
    pnlRoot.LoadLayout("vathmologia") 'this is the layout with tabstrip
  
    Main.NavControl.ShowPage(pgVathmologia)
End Sub

Private Sub pgVathmologia_Resize(Width As Int, Height As Int)
  
    Log("pgMain_Resize")
    Dim r As Rect = pgVathmologia.SafeAreaInsets
    pnlRoot.SetLayoutAnimated(0, 1, r.Left, r.Top, Width - r.Right - r.Left, Height - r.Bottom - r.Top)

End Sub

If i remove this tabstrip from my layout, everything works fine. So, i figure out that this causes problem. Without log file, it's too dificult to get whats wrong with versions lower than 12
p.s. i don't know what else info to give you in order to help me
 
Last edited:

Semen Matusovskiy

Well-Known Member
Licensed User
iTabStrip requires 10.2 only. Do you have #MinVersion ? Did you try to compile in Release mode and then to re-compile in XCode ? Warnings in XCode maybe useful.

For example, if to leave dafault MinVersion : 8, XCode talks:
B4X:
Object file (../../Libs/libiTabStrip.a(iTabStrip.o)) was built for newer iOS version (10.2) than being linked (8.0)
Object file (../../Libs/libiTabStrip.a(FXPageControl.o)) was built for newer iOS version (10.2) than being linked (8.0)
etc
 
Last edited:

yiankos1

Active Member
Licensed User
TabStrip will crash if it is empty, without any page. The problem in your code is that you add the TabStrip and don't immediately add a page.
Indeed, showing layout right before adding page at Tabstrip solves this bug.
Thank you both for your time.
 
Top