【问题标题】:Blank space between XLPagerTabStripXLPagerTabStrip 之间的空格
【发布时间】:2018-02-28 06:43:30
【问题描述】:

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

【问题讨论】:

    标签: ios iphone swift4 xlpagertabstrip


    【解决方案1】:

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2018-01-27
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-05-05
      相关资源
      最近更新 更多