【Swift】ナビゲーションバーの色を変更する

ナビゲーションバーの色を変える方法。

func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
// Override point for customization after application launch.
//ナビゲーションアイテムの色を変更
UINavigationBar.appearance().tintColor = UIColor.redColor()
//ナビゲーションバーの背景を変更
UINavigationBar.appearance().barTintColor = UIColor.yellowColor()
//ナビゲーションのタイトル文字列の色を変更
UINavigationBar.appearance().titleTextAttributes = [NSForegroundColorAttributeName : UIColor.greenColor()]
return true
}

↓参考サイト

返信を残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です

CAPTCHA