點storyboard空白處,而後如圖 bash
Appdelegate文件中加一句話,如圖 UINavigationBar.appearance()
的意思是修改掉全部的UINavigationBar
app
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
UINavigationBar.appearance().tintColor = .yellow
return true
}
複製代碼
在須要修改的頁面的viewdidload裏面加這句ide
navigationController?.navigationBar.tintColor = .yellow
複製代碼
以上這些是我目前總結出的最簡單的方法,歡迎你們補充。ui