iOS Question cant add more than one TabStrip

ihabsharaf

Member
Licensed User
Longtime User
i have problem with TabStrip i cant add more than one TabStrip in the project

SignalHandler 11
Error occurred on line: 47 (ImageDownloader)
Signal - 11
Stack Trace: (
"0 Sendebad SignalHandler + 120",
"1 libsystem_platform.dylib 0x0000000180907b34 _sigtramp + 36",
"2 UIKit <redacted> + 228",
"3 UIKit <redacted> + 148",
"4 Sendebad -[XLButtonBarView moveFromIndex:toIndex:withProgressPercentage:pagerScroll:] + 156",
"5 Sendebad -[XLButtonBarPagerTabStripViewController pagerTabStripViewController:updateIndicatorFromIndex:toIndex:withProgressPercentage:indexWasChanged:] + 128",
"6 Sendebad -[B4IPagerTabStrip pagerTabStripViewController:updateIndicatorFromIndex:toIndex:withProgressPercentage:indexWasChanged:] + 128",
"7 Sendebad -[XLPagerTabStripViewController updateContent] + 1536",
"8 Sendebad -[XLPagerTabStripViewController viewDidLayoutSubviews] + 68",
"9 UIKit <redacted> + 1580"
)



any solution for this issue ?
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
My mistake. You can add multiple TabStrips:

SS-2017-10-17_09.15.13.png


When I previously tested it I didn't add any page to the second TabStrip so it crashed. Make sure to always add at least one page.
 
Upvote 0

ihabsharaf

Member
Licensed User
Longtime User
My case is
Main screen have one tapstrip
And i have another
Page (invoice screen ) when
Add new tabstrip to invoice page
And try to run debuger i have error
After 3 hours to find what is the problem
Im try to remove last tapstrip
And run debuger its work but with one tabstrip
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
I've just added another TabStrip with the designer and modified the example code to:
B4X:
NavControl = Nav
   MainPage.Initialize("MainPage")
   MainPage.RootPanel.LoadLayout("Main")
   NavControl.ShowPage(MainPage)
   TabPages.Initialize
   Dim cs As CSBuilder
   Dim page1, page2, page3 As Page
   
   
   page1.Initialize("page1")
   page1.RootPanel.LoadLayout("Tab1")
   page1.Title = "Bing"
   WebView1.LoadUrl("https://www.bing.com")
   TabPages.Add(page1)
   
   page2.Initialize("page2")
   page2.RootPanel.LoadLayout("Tab1")
   WebView1.LoadUrl("https://www.google.com")
   cs.Initialize.Font(Font.CreateFontAwesome(18)).Color(0xFF014E1C).VerticalAlign(-1).Append("Google ").Append(Chr(0xF17B)).PopAll
   SetAttributedTitle(page2, cs)
   TabPages.Add(page2)
   
   page3.Initialize("page3")
   page3.RootPanel.LoadLayout("Tab1")
   WebView1.LoadUrl("https://www.duckduckgo.com")
   SetAttributedTitle(page3, cs.Initialize.Color(0xFFF46903).Append("DuckDuckGo").PopAll)
   'TabPages.Add(page3)
     
   TabStrip1.SetPages(TabPages)
   TabStrip2.SetPages(Array(page3))
 
Upvote 0

ihabsharaf

Member
Licensed User
Longtime User
on the same page its ok but if i want to load tabstrip on another page must call
TabStrip1.SetPages before show page
:):):):)
 
Upvote 0
Top