Closed wyk190576528 closed 2 years ago
[LEEAlert alert].config .LeeIdentifier(@"vistorAlertView") .LeeStatusBarStyle(self.gk_statusBarStyle) .LeeConfigMaxWidth(^CGFloat(LEEScreenOrientationType type, CGSize size) { return size.width; }) .LeeShouldAutorotate(NO) .LeeBackGroundColor([UIColor blackColor]) .LeeBackgroundStyleTranslucent(0.35f) .LeeCustomView(self.vistorAlertView) .LeeHeaderInsets(UIEdgeInsetsMake(0, 0, 0, 0)) .LeeHeaderColor([UIColor clearColor]) .LeeOpenAnimationConfig(^(void (^ _Nonnull animatingBlock)(void), void (^ _Nonnull animatedBlock)(void)) { self.vistorAlertView.alpha = 0.2; self.vistorAlertView.transform = CGAffineTransformScale(self.vistorAlertView.transform,0.8,0.8); [UIView animateWithDuration:0.5f delay:0 usingSpringWithDamping:0.7 initialSpringVelocity:1.0f options:UIViewAnimationOptionAllowUserInteraction animations:^{ animatingBlock(); //调用动画中Block self.vistorAlertView.transform = CGAffineTransformIdentity; self.vistorAlertView.alpha = 1; } completion:^(BOOL finished) { animatedBlock(); //调用动画结束Block }]; }) .LeeCloseAnimationConfig(^(void (^ _Nonnull animatingBlock)(void), void (^ _Nonnull animatedBlock)(void)) { [UIView animateWithDuration:0.25f delay:0 options:UIViewAnimationOptionCurveEaseOut animations:^{ animatingBlock(); self.vistorAlertView.alpha = 0; self.vistorAlertView.transform = CGAffineTransformScale(self.vistorAlertView.transform, 0.5, 0.5);
} completion:^(BOOL finished) { animatedBlock(); [self.vistorAlertView removeFromSuperview]; self.vistorAlertView = nil; }]; }) .LeeShow();
效果如下: 怎么设置,可以让视图下移紧贴屏幕底部?
垂直是根据 self.vistorAlertView 高度来撑的
[LEEAlert alert].config .LeeIdentifier(@"vistorAlertView") .LeeStatusBarStyle(self.gk_statusBarStyle) .LeeConfigMaxWidth(^CGFloat(LEEScreenOrientationType type, CGSize size) { return size.width; }) .LeeShouldAutorotate(NO) .LeeBackGroundColor([UIColor blackColor]) .LeeBackgroundStyleTranslucent(0.35f) .LeeCustomView(self.vistorAlertView) .LeeHeaderInsets(UIEdgeInsetsMake(0, 0, 0, 0)) .LeeHeaderColor([UIColor clearColor]) .LeeOpenAnimationConfig(^(void (^ _Nonnull animatingBlock)(void), void (^ _Nonnull animatedBlock)(void)) { self.vistorAlertView.alpha = 0.2; self.vistorAlertView.transform = CGAffineTransformScale(self.vistorAlertView.transform,0.8,0.8); [UIView animateWithDuration:0.5f delay:0 usingSpringWithDamping:0.7 initialSpringVelocity:1.0f options:UIViewAnimationOptionAllowUserInteraction animations:^{ animatingBlock(); //调用动画中Block self.vistorAlertView.transform = CGAffineTransformIdentity; self.vistorAlertView.alpha = 1; } completion:^(BOOL finished) { animatedBlock(); //调用动画结束Block }]; }) .LeeCloseAnimationConfig(^(void (^ _Nonnull animatingBlock)(void), void (^ _Nonnull animatedBlock)(void)) { [UIView animateWithDuration:0.25f delay:0 options:UIViewAnimationOptionCurveEaseOut animations:^{ animatingBlock(); self.vistorAlertView.alpha = 0; self.vistorAlertView.transform = CGAffineTransformScale(self.vistorAlertView.transform, 0.5, 0.5);
效果如下:
怎么设置,可以让视图下移紧贴屏幕底部?