Ios XLPagerTabStrip-所选选项卡选择不起作用

Ios XLPagerTabStrip-所选选项卡选择不起作用,ios,swift3,xcode8,xlpagertabstrip,Ios,Swift3,Xcode8,Xlpagertabstrip,XLPagerTabStrip库中选定的选项卡指示器不能与Swift 3和XCode 8一起使用 我正在为选项卡条使用以下自定义项 super.viewDidLoad() buttonBarView.selectedBar.backgroundColor = UIColor(red: 240.0/255.0, green: 89.0/255.0, blue: 43.0/255.0, alpha: 1.0) buttonBarView.backgroundColor =

XLPagerTabStrip库中选定的选项卡指示器不能与Swift 3和XCode 8一起使用

我正在为选项卡条使用以下自定义项

    super.viewDidLoad()

    buttonBarView.selectedBar.backgroundColor = UIColor(red: 240.0/255.0, green: 89.0/255.0, blue: 43.0/255.0, alpha: 1.0)
    buttonBarView.backgroundColor = UIColor.clear

    settings.style.selectedBarHeight = 3.0
    settings.style.selectedBarBackgroundColor = UIColor(red: 240.0/255.0, green: 89.0/255.0, blue: 43.0/255.0, alpha: 1.0)

    settings.style.buttonBarHeight = 45.0
    settings.style.buttonBarMinimumLineSpacing = 0.0
    settings.style.buttonBarLeftContentInset = 0.0
    settings.style.buttonBarRightContentInset = 0.0
    settings.style.buttonBarItemFont = UIFont(name: "Avenir-Book", size: 12.0)!
    settings.style.buttonBarItemBackgroundColor = UIColor.clear
    settings.style.buttonBarItemLeftRightMargin = 0.0
    settings.style.buttonBarItemTitleColor = UIColor.black

这就是上述问题的解决方案

    class ViewController: ButtonBarPagerTabStripViewController {

        override func viewDidAppear(_ animated: Bool) {
            let selectedBarHeight: CGFloat = 2

            buttonBarView.selectedBar.frame.origin.y = buttonBarView.frame.size.height - selectedBarHeight
            buttonBarView.selectedBar.frame.size.height = selectedBarHeight

        }


        override func viewDidLoad() {
            settings.style.selectedBarBackgroundColor = .green

            super.viewDidLoad()
        }  
    }