我使用过Carbon套件。标签栏在xcode 8中正常工作但在xcode 9中未选择菜单
dasboardItems = [UIImage.init(named: "logo")!.withRenderingMode(.alwaysOriginal),UIImage.init(named: "mess")!.withRenderingMode(.alwaysOriginal), UIImage.init(named: "usericon")!.withRenderingMode(.alwaysOriginal) ]
carbonTabSwipeNavigation = CarbonTabSwipeNavigation(items: dasboardItems as? [Any] , delegate: self)
carbonTabSwipeNavigation.insert(intoRootViewController: self, andTargetView: pageView)
carbonTabSwipeNavigation.setTabBarHeight(54)
carbonTabSwipeNavigation.carbonSegmentedControl?.backgroundColor = UIColor(netHex: 0x026B6B)
carbonTabSwipeNavigation.setIndicatorColor(UIColor.white)
carbonTabSwipeNavigation.setIndicatorHeight(2)
let tabWidth = self.view.width/3 + 1
lblChatCounterTrailingConstraints.constant = tabWidth + tabWidth / 2 - 45
carbonTabSwipeNavigation.carbonSegmentedControl?.setWidth(tabWidth, forSegmentAt: 0)
carbonTabSwipeNavigation.carbonSegmentedControl?.setWidth(tabWidth, forSegmentAt: 1)
carbonTabSwipeNavigation.carbonSegmentedControl?.setWidth(tabWidth, forSegmentAt: 2)
答案 0 :(得分:1)
你必须更新你的carbonKit Pod文件,因为carbonKit修复了iPhoneX和Xcode 9的错误 https://github.com/ermalkaleci/CarbonKit
它为我工作。