-
Notifications
You must be signed in to change notification settings - Fork 123
Open
Description
I got crash after selection any button of alert if there is keyboard active before [alert show];
This code leads to crash:
- (void)_addAnimation:(CAAnimation *)anim forKey:(NSString *)key {
UIWindow *keyWindow = [UIApplication sharedApplication].keyWindow;
if ([keyWindow.rootViewController isKindOfClass:[LMEmbeddedViewController class]]) {
UIView *view = [self delegate];
CABasicAnimation *basicAnim = (CABasicAnimation *)anim;
CGFloat modalWidth = 290.0;
// Hide _UIParallaxDimmingView. It's making the transparent nav controller go dark when animating
if ([[[view class] description] hasSuffix:@"DimmingView"]) {
view.hidden = YES;
}
// When pushing a view controller, make the one underneath slide out all the way
///CRASH HERE!!!!
if ([key isEqualToString:@"position"] && basicAnim.fromValue != nil) {
if ([basicAnim.fromValue CGPointValue].x == (modalWidth / 5.0)) {
basicAnim.fromValue = [NSValue valueWithCGPoint:CGPointMake(-(modalWidth / 2.0), [basicAnim.fromValue CGPointValue].y)];
}
}
if (view.frame.origin.x == (-0.3 * modalWidth)) {
CGRect frame = view.frame;
frame.origin.x = -modalWidth;
view.frame = frame;
}
}
// Note: this calls original Apple implementation of addAnimation:forKey:
[self _addAnimation:anim forKey:key];
}
Metadata
Metadata
Assignees
Labels
No labels