您的位置:首页 > 移动开发 > Swift

How to change tintColor of UIBarButtonItem? [SWIFT]

2016-03-17 16:04 555 查看
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {

// Changing the status bar's colour to white
UIApplication.sharedApplication().statusBarStyle = .LightContent

// Changing the navigation controller's background colour
UINavigationBar.appearance().barTintColor = UIColor(red: 0.0/255.0, green: 165.0/255.0, blue: 227.0/255.0, alpha: 1.0)

// Changing the navigation controller's title colour
UINavigationBar.appearance().titleTextAttributes = [NSForegroundColorAttributeName: UIColor.whiteColor()]

// Changing the colour of the bar button items
UINavigationBar.appearance().tintColor = UIColor.whiteColor()

// Changing the tint colour of the tab bar icons
UITabBar.appearance().tintColor = UIColor(red: 0.0/255/0, green: 165.0/255.0, blue: 227.0/255.0, alpha: 1.0)

return true
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: