I am currently adding a new UIWindow to my application when I show my own custom warning.
Before adding this UIWindow, my application hid the status bar, but now it is visible. How can I hide the status bar programmatically in this new window. I tried everything, but it does not work.
This is how I add my UIWindow:
notificationWindow = [[UIWindow alloc] initWithFrame: CGRectMake(0, 0, 1.0, 1.0)];
notificationWindow.backgroundColor = [UIColor clearColor];
notificationWindow.userInteractionEnabled = NO;
notificationWindow.windowLevel = UIWindowLevelAlert + 1;
notificationWindow.rootViewController = [UIViewController new];
notificationWindow.hidden = NO;
[notificationWindow addSubview:confettiView];
source
share