首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >XLPagerTabStrip之间的空格

XLPagerTabStrip之间的空格
EN

Stack Overflow用户
提问于 2018-02-28 14:43:31
回答 1查看 283关注 0票数 0

我正在尝试在我的应用程序中实现XLPagerTabStrip。一切都很好,因为我遵循了官方的Tutorial,我已经把我的collectionView的颜色改成了红色。当应用程序在模拟器中运行时,我看到有一个类似图像的空白区域

我想知道怎样去掉那个空格?因为它应该是红色的,我怎么才能改变黑线的颜色呢?

这是我的代码:

代码语言:javascript
复制
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
    }
}

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2018-03-01 01:21:36

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

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/49023450

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档