swiftswift4xlpagertabstrip

XLPagerTabStrip : My title label in tab bar not fully showed


How can i solve this tab label not fully showed ?

Screenshot problem:

[![enter image description here][1]][1]

When i try in new project the label of tab bar is showing normal, but in the now project that i worked on, the label of tab bar not fully showed, please help me, what's wrong with this one

        settings.style.buttonBarBackgroundColor = .white
        settings.style.buttonBarItemBackgroundColor = .white
        settings.style.selectedBarBackgroundColor = blueInstagramColor
        settings.style.buttonBarItemFont = .boldSystemFont(ofSize: 14)
        settings.style.selectedBarHeight = 2.0
        settings.style.buttonBarMinimumLineSpacing = 0
        settings.style.buttonBarItemTitleColor = .black
        settings.style.buttonBarItemsShouldFillAvailableWidth = true
        settings.style.buttonBarLeftContentInset = 0
        settings.style.buttonBarRightContentInset = 0

        changeCurrentIndexProgressive = { [weak self] (oldCell: ButtonBarViewCell?, newCell: ButtonBarViewCell?, progressPercentage: CGFloat, changeCurrentIndex: Bool, animated: Bool) -> Void in
            guard changeCurrentIndex == true else { return }
            oldCell?.label.textColor = .black
            newCell?.label.textColor = self?.blueInstagramColor
        }

        super.viewDidLoad()

        backListener()
    }

    override func viewControllers(for pagerTabStripController: PagerTabStripViewController) -> [UIViewController] {
        let child_1 = LeaveWaitingViewController()
        let child_2 = LeaveApprovedViewController()
        let child_3 = LeaveRejectedViewController()

        return [child_1, child_2, child_3]
    }


  [1]: https://i.sstatic.net/UBrLy.png

Solution

  • Something wrong in the label, to fix this you just need to check did you add any label extension in your project, try to delete it