Problem Description:
In case of a situation, on a controller (hide the navigation bar), after opening the photo selector Uiimagepickercontroller, the photo selector head Blank, and slide album, the information will have a confusion effect.
Cause Analysis:
By looking at the hierarchy, you can see that the navigation bar is actually there, so the problem is that the navigation bar is transparent.
Workaround:
uiimagepickercontroller *picker = [[uiimagepickercontroller alloc] init];
Picker. delegate = self;
Picker. sourcetype = uiimagepickercontrollersourcetypephotolibrary;
[uiapplication sharedapplication]. Statusbarstyle = Uistatusbarstyledefault; This sentence to see personal needs, I need to change the status bar color
Picker. Navigationbar. Translucent = NO; This sentence sets the navigation bar opaque (!!!!!!!!!!!!!!!!!!!!!!!!! Solve the problem)
[Picker. navigationbar setbartintcolor: [uicolor redcolor]]; If you need to set the background color of the custom navigation bar, use this setting
Please leave a message if you have questions.
ios resolves an issue where the navigation bar does not appear after you open the photo selector after you hide the navigation bar and replace the navigation bar background color