0

The view of my iOS app moves slightly down when red audio-recording status bar caused by some third party app (like Viber) is showing. This kinda breaks the interface of my app.

Is there any system notification i can subscribe to to get notified when this bar is showing? Can i get the height of this bar?

Alexander
  • 959
  • 5
  • 11
  • 29

1 Answers1

0

You need to use notifications when status bar changed.

Use code below to handle this:

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
    [[NSNotificationCenter defaultCenter] addObserver:self
                                             selector:@selector(change:)
                                                 name:UIApplicationWillChangeStatusBarFrameNotification
                                               object:nil];

}

- (void)change:(NSNotification *)notificacion {
    NSLog(@"%@", notificacion.userInfo);
}
vlad.grb
  • 339
  • 4
  • 16