我正在尝试在我的应用程序中实现XLPagerTabStrip。一切都很好,因为我遵循了官方的Tutorial,我已经把我的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
}
}

发布于 2018-03-01 01:21:36
我解决了我的问题,我忘记了这一行super.viewDidLoad()最后应该是viewDidload方法
https://stackoverflow.com/questions/49023450
复制相似问题