iOS导航栏颜色,任务栏颜色

    AppDelegate中添加如下代码:

func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
        // Override point for customization after application launch.
        UINavigationBar.appearance().barTintColor = UIColor(red: 20/255, green: 155/255, blue: 213/255, alpha: 0.9)
        UINavigationBar.appearance().titleTextAttributes = [NSForegroundColorAttributeName: UIColor.whiteColor(),NSFontAttributeName: UIFont(name: "Heiti SC", size: 20.0)!]
        UIApplication.sharedApplication().statusBarStyle = .LightContent
        return true
    }

  

posted on 2016-03-12 19:19  罗小夕  阅读(263)  评论(0编辑  收藏  举报

导航