File tree Expand file tree Collapse file tree 3 files changed +2
-7
lines changed
SPAlertController.xcodeproj/project.xcworkspace/xcuserdata/leshengping.xcuserdatad
SPAlertController/SPAlertController Expand file tree Collapse file tree 3 files changed +2
-7
lines changed Original file line number Diff line number Diff line change @@ -2103,10 +2103,7 @@ - (void)presentationTransitionWillBegin {
21032103 id <UIViewControllerTransitionCoordinator> coordinator = [self .presentedViewController transitionCoordinator ];
21042104 if (coordinator) {
21052105 [coordinator animateAlongsideTransition: ^(id <UIViewControllerTransitionCoordinatorContext> context) {
2106- // 当键盘弹出时,键盘动画跟协调器会产生冲突,用模拟器放慢速度可以看到,键盘已经弹出后,overlayView的alpha才开始渐变,猜想这可能是由于2种动画处于同一祯的缘故,因此这里加一个block,异步绘制
2107- dispatch_async (dispatch_get_main_queue (), ^{
2108- self.overlayView .alpha = 1.0 ;
2109- });
2106+ self.overlayView .alpha = 1.0 ;
21102107 } completion: nil ];
21112108 } else {
21122109 self.overlayView .alpha = 1.0 ;
@@ -2135,9 +2132,7 @@ - (void)dismissalTransitionWillBegin {
21352132 id <UIViewControllerTransitionCoordinator> coordinator = [self .presentedViewController transitionCoordinator ];
21362133 if (coordinator) {
21372134 [coordinator animateAlongsideTransition: ^(id <UIViewControllerTransitionCoordinatorContext> context) {
2138- dispatch_async (dispatch_get_main_queue (), ^{
2139- self.overlayView .alpha = 0.0 ;
2140- });
2135+ self.overlayView .alpha = 0.0 ;
21412136 } completion: nil ];
21422137 } else {
21432138 self.overlayView .alpha = 0.0 ;
You can’t perform that action at this time.
0 commit comments