gpt4 book ai didi

ios - XLPagerTabStrip 之间的空白

转载 作者:行者123 更新时间:2023-11-29 00:02:42 28 4
gpt4 key购买 nike

我正在尝试在我的应用程序中实现 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
}
}

image of my app

最佳答案

我解决了我的问题,我忘记了这一行 super.viewDidLoad() 应该在 viewDidload 方法的最后

关于ios - XLPagerTabStrip 之间的空白,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49023450/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com