Xcode/Swift

swift-tabbar修改文字大小和位置

2017-02-08  本文已影响78人  A_rcher34

本篇说明的是调节系统的tabbar上文字的大小和位置

let photoVC = DemoPhotoViewController()
photoVC.setShowType(ShowType.present)
let photoNav = BaseNavigationController.init(rootViewController: photoVC)
photoNav.tabBarItem.title = "照片"
photoNav.tabBarItem.setTitleTextAttributes(NSDictionary.init(dictionary: [NSFontAttributeName : UIFont.systemFont(ofSize: 15)]) as? [String : Any], for: UIControlState.normal)
photoNav.tabBarItem.titlePositionAdjustment = UIOffsetMake(0, -12)
photoNav.tabBarItem.setTitleTextAttributes(NSDictionary.init(dictionary: [NSFontAttributeName : UIFont.systemFont(ofSize: 15)]) as? [String : Any], for: UIControlState.normal)
photoNav.tabBarItem.titlePositionAdjustment = UIOffsetMake(0, -12)
上一篇下一篇

猜你喜欢

热点阅读