From 5172842b9e79d8db7c1d5065c252b9c605deb8f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E9=93=B6=E9=BE=99?= <469891897@qq.com> Date: Tue, 14 Feb 2017 21:25:56 +0800 Subject: [PATCH] fix animation in ios10 --- Classes/MMPopupView.m | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Classes/MMPopupView.m b/Classes/MMPopupView.m index 6fa9a5d..2bedfef 100644 --- a/Classes/MMPopupView.m +++ b/Classes/MMPopupView.m @@ -174,7 +174,7 @@ - (MMPopupBlock)alertShowAnimation [self mas_updateConstraints:^(MASConstraintMaker *make) { make.center.equalTo(self.attachedView).centerOffset(CGPointMake(0, self.withKeyboard?-216/2:0)); }]; - [self layoutIfNeeded]; + [self.superview layoutIfNeeded]; } self.layer.transform = CATransform3DMakeScale(1.2f, 1.2f, 1.0f); @@ -245,7 +245,7 @@ - (MMPopupBlock)sheetShowAnimation make.centerX.equalTo(self.attachedView); make.bottom.equalTo(self.attachedView.mas_bottom).offset(self.attachedView.frame.size.height); }]; - [self layoutIfNeeded]; + [self.superview layoutIfNeeded]; } [UIView animateWithDuration:self.animationDuration @@ -321,7 +321,7 @@ - (MMPopupBlock)customShowAnimation [self mas_updateConstraints:^(MASConstraintMaker *make) { make.center.equalTo(self.attachedView).centerOffset(CGPointMake(0, -self.attachedView.bounds.size.height)); }]; - [self layoutIfNeeded]; + [self.superview layoutIfNeeded]; } [UIView animateWithDuration:self.animationDuration