Why is UIApplicationWillChangeStatusBarFrameNotification not sent when the in-call status bar is sho
Posted
by Sbrocket
on Stack Overflow
See other posts from Stack Overflow
or by Sbrocket
Published on 2010-03-09T02:01:19Z
Indexed on
2010/03/09
2:06 UTC
Read the original article
Hit count: 563
iphone
|iphone-sdk
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 – 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.
© Stack Overflow or respective owner