2017-11-22 1 views

Antwort

0

Sie es in AppDelegate

func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { 
    // Override point for customization after application launch. 
    UINavigationBar.appearance().barTintColor = UIColor(red: 0, green: 0/255, blue: 205/255, alpha: 1) 
    UINavigationBar.appearance().tintColor = UIColor.whiteColor() 
    UINavigationBar.appearance().titleTextAttributes = [NSForegroundColorAttributeName:UIColor.whiteColor()] 

    return true 
} 

setzen kann oder Viewcontroller

override func viewWillAppear(animated: Bool) { 
super.viewWillAppear(animated) 
self.navigationController?.navigationBar.barTintColor = UIColor.whiteColor() 
self.navigationController?.navigationBar.tintColor = UIColor.blueColor() 
self.navigationController!.navigationBar.titleTextAttributes = [NSForegroundColorAttributeName: UIColor.blueColor()] 

} 

detaillierter und Kredit gesetzt in: Swift - iOS : Change the color of a Navigation Bar

Hoffe diese Hilfe

Verwandte Themen