I've got a UIButton
(the 'back button') in the upper left corner of an iPad application that dismisses a view controller. I've discovered that if you tap this button slightly too high, you can both activate the button and start to pull down the notifications pane at the same time. When this happens, my -viewWillDisappear
gets executed and stops the animations in the view, but the view doesn't actually dismiss. Of course, the notifications pane doesn't come down all the way, so the net result looks like my animations crashed, and that the back button failed as well.
The obvious solution would be to just move the button down a little bit, but as that is undesirable for layout reasons, I'm curious if:
EDIT: actually looks like less of an issue after all. Turns out it's my -applicationWillResignActive
that's getting called, not -viewWillDisappear
. Still looks bad, but at least the behavior is well defined. I'm not activating my home button at all, just pulling down the notifications pane.
Question: Q: Notification center bubble. Answer: A: Try Settings, Accessibility, Touch, Assistive touch off.
On iPhone and iPad, Notification Center is a centralized interface for reviewing notifications on your device that have been received from apps or the operating system itself. To view Notification Center while your iPhone or iPad is unlocked, swipe downward from the center of the upper edge of the screen.
I have done an UIViewController which has a timed animation (like a banner ad) going on, and bringing the notification pane down does not stop it until the pane is fully disclosured.
Maybe you have to deal with your animations on -applicationWillResignActive:
and -applicationDidBecomeActive:
, like pausing and resuming them.
You can receive those notifications directly on your UIViewController (instead of dealing with them on you AppDelegate) by adding the following code to your -viewDidLoad
:
// Add observers
[[NSNotificationCenter defaultCenter]addObserver:self
selector:@selector(pauseAnimations:)
name: UIApplicationWillResignActiveNotification
object:nil];
[[NSNotificationCenter defaultCenter]addObserver:self
selector:@selector(resumeAnimations:)
name:UIApplicationDidBecomeActiveNotification
object:nil];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With