Closed buoge closed 7 years ago
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey : Any]? = nil) -> Bool { // 自定义Tabbar间距 customizeTabbarStyle() }
// 自定义tabbar样式 func customizeTabbarStyle(){ let tabBarItemAppearance = UITabBarItem.appearance() tabBarItemAppearance.titlePositionAdjustment = UIOffset(horizontal: 5, vertical: 10) }
ok
Base Info for this issue
1. How to repeat the problem.
CYLTabBarController.h:swift 中无法设置这个值:titlePositionAdjustment,只有 get 方法:
open var titlePositionAdjustment: UIOffset { get }
, 这样子就无法设置按钮的左右间距? 是需要使用新的方式调整吗? self.tabBarItem.titlePositionAdjustment = UIOffset(horizontal: 10, vertical: 10)2. Please help me in this way.
3. Here is a Demo.
4. Here is my Debug log