XLPagerTabStrip无法覆盖整个宽度

时间:2018-07-02 21:32:37

标签: ios swift uicollectionview xlpagertabstrip

嗨,所以我的xlpagertabstrip基本上不覆盖整个宽度,尤其是当宽度达到ipad大小时。我已经尝试了与过去存在相同问题的问题不同的方法,但无济于事,例如更改buttonbarviewcontroller的类。这是代码

settings.style.buttonBarBackgroundColor = #colorLiteral(red: 0.2549019754, green: 0.2745098174, blue: 0.3019607961, alpha: 1)
    settings.style.buttonBarItemBackgroundColor = .white
    settings.style.selectedBarBackgroundColor = #colorLiteral(red: 0.1019607857, green: 0.2784313858, blue: 0.400000006, alpha: 1)
    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

    super.viewDidLoad()

    view.setNeedsLayout()
    view.layoutIfNeeded()

,这就是现在的样子。

enter image description here

感谢您能提供帮助的任何人。

0 个答案:

没有答案