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