I need to show UIView with full screen mode above NavigationBar and StatusBar How i can do that?
P.S. Sorry for my English
I need to show UIView with full screen mode above NavigationBar and StatusBar How i can do that?
P.S. Sorry for my English
The below code will help you with that. You can change the color to your desired color to achieve the desired affect.
UIWindow *window = [[[UIApplication sharedApplication] delegate] window];
UIView *blue = [[UIView alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
[blue setBackgroundColor:[UIColor blueColor]];
[window addSubview: blueView];
Swift Code:
if let applicationDelegate:AppDelegate = UIApplication.shared.delegate as! AppDelegate? {
if let window:UIWindow = applicationDelegate.window {
let blueView:UIView = UIView(frame: UIScreen.main.bounds)
blueView.backgroundColor = UIColor.blue.withAlphaComponent(0.75)
window.addSubview(blueView)
}
}
You might want to take a look at this persons answer.
How to make a UIView that can cover the navigation bar?
Basically, instead of setting your 2nd view as a subview of your main view, set the 2nd view as a subview of your navigation controller.