iOSアプリ開発のメモ置き場

ささたつがiOSアプリ開発で知ったObjective-Cのtipsなどを書いていく所存

navigationBarのデザインをカスタマイズする

背景色を変えたい → barTintColor を使う

[UINavigationBar appearance].barTintColor = [UIColor colorWithRed:1.000 green:0.447 blue:0.176 alpha:1.0];

ナビゲーションバー上の戻るリンクの色を変えたい → tintColor を使う

[UINavigationBar appearance].tintColor = [UIColor whiteColor];

タイトルの文字色を変えたい → titleTextAttributes を使う

[UINavigationBar appearance].titleTextAttributes = @{NSForegroundColorAttributeName: [UIColor whiteColor]};