Search code examples
iosswift3pagertabstripxlpagertabstrip

XLPagerTabStrip: Title label doesn't show on pager tab


I'd like to create pager tab like InstagramExample of XLPagerTabStrip and I follow all layout and coding to get the same. After adding everything I cannot see the title label on pager tab but I can swipe views as much as I add in array. Could anyone help me with this issue, please? I use the latest version of XLPagerTabStrip (v7.0.0).

enter image description here

enter image description here

enter image description here

enter image description here


Solution

  • The pager tab is covered by NavigationBar.

    so ,you can

    1: to hide NavigationBar

    self.navigationController?.isNavigationBarHidden = true
    

    2: to move tab

    //get rod of containerView offset
    edgesForExtendedLayout = []
    //move tab    
    buttonBarView.frame.origin.y = buttonBarView.frame.origin.y + 30