diff --git a/LMAlertView/CALayer+ModalAlert.m b/LMAlertView/CALayer+ModalAlert.m index 085311c..824f6b8 100644 --- a/LMAlertView/CALayer+ModalAlert.m +++ b/LMAlertView/CALayer+ModalAlert.m @@ -42,7 +42,7 @@ - (void)_addAnimation:(CAAnimation *)anim forKey:(NSString *)key { UIView *view = [self delegate]; UIWindow *window = [self windowForView:view]; - if ([window.rootViewController isKindOfClass:[LMEmbeddedViewController class]]) { + if ([window.rootViewController isKindOfClass:[LMEmbeddedViewController class]] && [anim isKindOfClass:[CABasicAnimation class]]) { CABasicAnimation *basicAnim = (CABasicAnimation *)anim; CGFloat modalWidth = 290.0;