2016-08-03 7 views

答えて

1

barTintColorに変更backgroundColor

UINavigationBar.appearance().barTintColor = UIColor.blackColor() 
UINavigationBar.appearance().translucent = false 

例えば

func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool 
{ 
    UINavigationBar.appearance().barTintColor = UIColor.blackColor() 
    UINavigationBar.appearance().translucent = false 

    return true 
} 

または

を使用し、これを試してください
self.navigationController!.navigationBar.barTintColor = UIColor.blackColor() 
    self.navigationController!.navigationBar.translucent = false 

例えば

override func viewDidLoad() { 
    super.viewDidLoad() 

    self.navigationController!.navigationBar.barTintColor = UIColor.blackColor() 
    self.navigationController!.navigationBar.translucent = false 

     } 
関連する問題