2

I've been trying to listen for changes in the status bar height – such as when the in-call status bar is shown or hidden, or the same with the internet tethering status bar – by listening for the UIApplicationWillChangeStatusBarFrameNotification notification to be sent.

Fairly straightforward code here...

[[NSNotificationCenter defaultCenter] addObserver:self
                                         selector:@selector(statusBarWillChangeFrame:) 
                                             name:UIApplicationWillChangeStatusBarFrameNotification
                                           object:nil];

But the notification never seems to be sent in that case, either on the Simulator by using the "Toggle In-Call Status Bar" option or on the device when a call ends with the application open. In addition, the similar UIApplicationDelegate method is not called.

According to the documentation,

UIApplicationWillChangeStatusBarFrameNotification

Posted when the application is about to change the frame of the status bar.

The userInfo dictionary contains an NSValue object that encapsulates a CGRect structure expressing the location and size of the new status bar frame. Use UIApplicationStatusBarFrameUserInfoKey to access this value.

Can anyone explain why this notification is not being sent in response to the in-call status bar being shown or hidden? According to the documentation, it should be.

Bryan Henry
  • 8,348
  • 3
  • 34
  • 30
  • Are you more interested in finding out why the notification isn't being sent for incoming calls or more interested in getting notification that there is an incoming call? – Anthony Mar 09 '10 at 02:23
  • I'm not interested in incoming calls at all, read the question again. I only want to know when the status bar's frame changes. There are two major cases where this happens - when the in-call status bar either appears or disappears, or when the internet tethering status bar does the same. – Bryan Henry Mar 09 '10 at 02:41
  • I keep seeing in-call as incoming call. Sorry. What is in-call? I couldn't find that term, thus my confusion. – Anthony Mar 09 '10 at 02:52
  • Also, this isn't quite the same as your question, but it does speak to in-call frame changes, I think. : http://stackoverflow.com/questions/1114557/resize-for-in-call-status-bar – Anthony Mar 09 '10 at 02:55

1 Answers1

3

It appears as if this is an active SDK bug. So much for that.

See http://openradar.appspot.com/6475681 and http://openradar.appspot.com/7080782.

Bryan Henry
  • 8,348
  • 3
  • 34
  • 30