-[UIApplication setStatusBarHidden:withAnimation:] doesn't fire KVO notification
Originator: | Greiner.Mike | ||
Number: | rdar://13127006 | Date Originated: | 2013-01-31 |
Status: | Open | Resolved: | No |
Product: | iPhone SDK | Product Version: | 6.1 |
Classification: | Other Bug | Reproducible: | Always |
Summary: Hiding or showing the status bar using -[UIApplication setStatusBarHidden:withAnimation] does not result in KVO notifications for observers of the "statusBarHidden" property. Only -[UIApplication setStatusBarHidden:] results in KVO notifications. Steps to Reproduce: 1. Add an object as an observer to UIApplication's "statusBarHidden" key path. 2. Call -[UIApplication setStatusBarHidden:withAnimation:] somewhere else in the code. Expected Results: The observing object's -observeValueForKeyPath:ofObject:change:context: method is called after the animation completes – or – some other mechanism is provided for notifying interested objects that the status bar has been shown/hidden. Actual Results: The observing object's -observeValueForKeyPath:ofObject:change:context: method is never called Regression: No Notes: See attached sample project. My root view controller observes UIApplication's "statusBarHidden" property response to changes by resizing itself. Tapping the top button calls -[UIApplication setStatusBarHidden:] and the view is resized correctly. Tapping the bottom button calls -[UIApplication setStatusBarHidden:withAnimation] and the view is not resized.
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!