Пустое пространство между XLPagerTabStrip

Я пытаюсь реализовать XLPagerTabStrip в своем приложении. Все хорошо, потому что я следовал официальному Учебник Я изменил цвет моего collectionView на красный. Когда приложение запускается в симуляторе, я вижу пустое пространство, например изображение.

Я хочу знать, как удалить это пустое место? потому что все должно быть красным и как я могу изменить цвет черной линии?

это мой код:

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
    }
}

изображение моего приложения


person Dimoreno    schedule 28.02.2018    source источник


Ответы (1)


Я решил свою проблему, я забыл, что эта строка super.viewDidLoad() должна быть последней из метода viewDidload

person Dimoreno    schedule 28.02.2018