IOS hidden navigation bar and status bar implementation method
The height of the status bar is 20, the height of the navigation bar is 44, and if the navigation bar of the status bar is present, we typically set the position of the control on the view to be greater than or equal to 64.
One: Hidden navigation bar :self.navigationController.navigationBarHidden = YES;
Two: Hide the status bar:
Step One: Add two types (type) to the BOOL option in the Info.plist file, status bar is initially hidden set to Yes;view controller-based status bar Appeara NCE is set to No;
Step Two: Write code for the page where you want to hide the status bar: [uiapplication sharedapplication].statusbarhidden = YES;
In addition, it is worth saying that: the principle used to hide the status bar and the hidden navigation bar is the same as the nature, in a page a hidden, other related to his page B (such as Apush to B) of the status bar/navigation bar will also be hidden, if you do not want to hide a page of the status bar/navigation bars, You can write in Viewwillappear: (BOOL) animated [UIApplication Sharedapplication].statusbarhidden = no/ Self.navigationController.navigationBarHidden = NO;
Thank you for reading, I hope to help you, thank you for your support for this site!