How iOS12-Swift5-Xcode10 change navigation (Navigation Bar) Back button color

Global modifications (the entire app will get rid of all the back button):

storyboard

Storyboard point blank, and FIG.

Code

Appdelegate file add a word, as UINavigationBar.appearance()the meaning is to modify off all of theUINavigationBar

 func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
        // Override point for customization after application launch.
        UINavigationBar.appearance().tintColor = .yellow
        
        return true
    }
复制代码

Local modification

In viewdidload you need to modify the pages inside plus sentence

navigationController?.navigationBar.tintColor = .yellow
复制代码

These are the easiest way to sum up my current, and welcome to add.

 

commercial time:

Brother had done two sets of video tutorials iOS development, welcome to audition:

m.cctalk.com/inst/s9vfhe…

Reproduced in: https: //juejin.im/post/5d09bf5a6fb9a07ef4440a98

Guess you like

Origin blog.csdn.net/weixin_34270865/article/details/93181129