1

I'm trying to get a view above the status bar in ios9:

UIWindow *statusWindow = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
    statusWindow.windowLevel = UIWindowLevelStatusBar + 1;
    statusWindow.hidden = NO;
    statusWindow.backgroundColor = [UIColor colorWithWhite:0.0 alpha:0.7];
    [statusWindow setRootViewController:self];
    [statusWindow makeKeyAndVisible];

I only get a black screen with the status bar not covered. Any idea why it's not working ?

rushelmet
  • 305
  • 2
  • 15

2 Answers2

1

I am going to go ahead and assume you are writing your code based off of this thread:

Add UIView Above All Other Views, Including StatusBar

That being said, why are you setting:

statusWindow.windowLevel = UIWindowLevelStatusBar + 1;

It should be:

statusWindow.windowLevel = UIWindowLevelStatusBar;

In the future, please add references to any threads you have looked at as well.

Good luck!

Community
  • 1
  • 1
adamsuskin
  • 547
  • 3
  • 16
0

I found this : https://github.com/kevingibbon/KGStatusBar It works pretty well. It's the only framework I found which is working with iOS9.

rushelmet
  • 305
  • 2
  • 15