I want to do a save image function, after the success of the pop-up tips. When I press the picture pop-up alertController, save the success did not see the prompt box displayed on the keywindow, what is going on ?
//show the tip of suceess
-(void)show{
UIWindow * window =[UIApplication sharedApplication].keyWindow;
[window addSubview:self];
[self mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(window.mas_top);
make.leading.equalTo(window.mas_leading);
make.trailing.equalTo(window.mas_trailing);
make.bottom.equalTo(window.mas_bottom);
}];
[self layoutIfNeeded];
self.alpha = 0;
[UIView animateWithDuration:.2 animations:^{
self.alpha = 1;
}];
_alertView.transform = CGAffineTransformMakeScale(0.1, 0.1);
[UIView animateWithDuration:0.3 delay:0.0 usingSpringWithDamping:0.7 initialSpringVelocity:1 options:UIViewAnimationOptionCurveEaseOut animations:^{
_alertView.alpha=1.0;
_alertView.transform = CGAffineTransformIdentity;
} completion:^(BOOL finished) {
}];
}
Try this