This method is called when the class is first created, and is called only once by the overrideclass func Initialize () { = Uinavigationbar.appearance () // set the navigation bar to become opaque, so that the origin of the coordinates of the view starts from the bottom edge of the navigation bar, or you can set the background picture to achieve this effect . false
//Set the navigation bar background color = Uicolor.redcolor () }
In the controller, by setting this property, you can add a hint in the top of the navigation bar, you need to note that if the prompt property is set, then the total height of the navigation bar area will become 94 pixels
self. Navigationitem. Prompt = " prompt area "
// by default, toolbars in the navigation bar controller are hidden, and you can use the following methods to display the system's own toolbars false // setting the toolbar background color self.navigationcontroller!. Toolbar.bartintcolor = Uicolor.redcolor ()
Swift overrides the Initialize method of the Navigation controller class