Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I looked into this a bit with the JLBPartialModal control. It looks like the author adds an animation with a scale in <code>- (void)presentViewController:(UIViewController *)viewControllerToPresent dismissal:(void (^)(void))block</code>,</p> <pre><code> for (UIWindow *window in [[UIApplication sharedApplication] windows]) { if (window != self.window) { [window.layer addAnimation:[self pullBackAnimation] forKey:@"pullBackAnimation"]; [UIView animateWithDuration:JLB_PARTIAL_MODAL_ANIMATION_DURATION animations:^{ window.center = CGPointMake(window.center.x, window.center.y - JLB_PARTIAL_MODAL_WINDOW_VERTICAL_OFFSET); } completion:^(BOOL finished) { if (!hasCalledDelegate) { [self.delegate didPresentPartialModalView:self]; hasCalledDelegate = YES; } }]; } } </code></pre> <p>then removes this animation in <code>- (void)dismissViewController</code>.</p> <pre><code> for (UIWindow *window in [[UIApplication sharedApplication] windows]) { [window.layer removeAllAnimations]; } </code></pre> <p>He assumes that the array of <code>windows</code> in the first method is the same set of windows in the dismissal method, which I would perhaps question. It would appear that your keyboard is in a window that has this scale attribute set on it, but has not been removed.</p> <p>Therefore, I recommend that when you either fix the problem with the component, or as an interim fix, you perform this second loop (the removeAllAnimations one) in response to the keyboard being displayed.</p> <p>I'm not 100% confident this is the answer without seeing your code. You may be doing something elsewhere that is affecting the state of the window system.</p> <p>EDIT: Now that you have posted code, I think I can see the problem. The notification you are signing up for is KeyboardDidHide... but you treat it as a "WillHide" notification. By the time you call the <code>dismissViewController</code> on the JLBPartialModal sharedInstance, the keyboard is no longer in the set of windows in the <code>[UIApplication sharedApplication].windows</code> property. This means the animation is NOT removed from the window containing the keyboard. What you have will probably work if you change <code>UIKeyboardDidHideNotification</code> to <code>UIKeyboardWillHideNotification</code>.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload