2019-03-11 iOS 窗口Window缩小动画(假象)

UIWindow *window = [UIApplication.sharedApplication keyWindow];


    UIView* shadowBack = [[UIView alloc]initWithFrame:window.bounds];

    shadowBack.backgroundColor = [UIColor blackColor];

    shadowBack.alpha=1.0;

    [window addSubview:shadowBack];


    NSTimeInterval timeInterval =0.35;

    UIView *snapView = [self.navigationController.view snapshotViewAfterScreenUpdates:NO];


    [window addSubview:snapView];


    [UIView animateWithDuration:timeInterval animations:^{

        snapView.transform = CGAffineTransformMakeScale(0.8, 0.8);

    }completion:^(BOOLfinished) {

        snapView.transform = CGAffineTransformMakeScale(0.8, 0.8);

    }];


    XDPayCommonView *payAlertView = [XDPayCommonView xd_getFromXib];


    [payAlertView showView:self.orderModel.totalAmount amount:@"0.0" WithCompletion:^(XDPayType payType) {

        [weakSelf payOrderWithType:payType];

    } withDismissComplection:^{

        [UIView animateWithDuration:timeInterval animations:^{


            snapView.transform = CGAffineTransformIdentity;


        }completion:^(BOOLfinished) {

            [snapView removeFromSuperview];

            [shadowBack removeFromSuperview];

        }];


    }];

你可能感兴趣的:(2019-03-11 iOS 窗口Window缩小动画(假象))