大佬教程收集整理的这篇文章主要介绍了ios – 如何在Swift中更改UIBarButtonItem的tintColor?,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
在故事板中,我还将其设置为白色.
这是我的代码,它位于AppDelegate.swift文件中:
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,alpha: 1.0) return true }
这是模拟器的图像:
以上是大佬教程为你收集整理的ios – 如何在Swift中更改UIBarButtonItem的tintColor?全部内容,希望文章能够帮你解决ios – 如何在Swift中更改UIBarButtonItem的tintColor?所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。