iosiphoneswift4xlpagertabstrip

Blank space between XLPagerTabStrip


I am trying to implement XLPagerTabStrip in my application. All is good because I have followed the official Tutorial I have changed the color of my collectionView to red. When the app runs in the simulator I see that there is a blank space like image

I want to know how to remove that blank space? because it should be all red and how can I change the black line color?

this is my code:

override func viewDidLoad() {
    super.viewDidLoad()
    settings.style.buttonBarBackgroundColor = .red
    settings.style.buttonBarItemBackgroundColor = .red
    settings.style.selectedBarBackgroundColor = purpleInspireColor
    settings.style.buttonBarItemFont = UIFont.systemFont(ofSize: 12, weight: UIFont.Weight.regular)
    settings.style.selectedBarHeight = 0.5
    settings.style.buttonBarMinimumLineSpacing = 0
    settings.style.buttonBarItemTitleColor = .white
    settings.style.buttonBarItemsShouldFillAvailiableWidth = 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 = .white
        newCell?.label.textColor = self?.purpleInspireColor
    }
}

image of my app


Solution

  • I solved my problem I forgot that this line super.viewDidLoad() should be at last of viewDidload method