0
ポップアップヒントの成功後、画像の保存機能を実行したい。私が画像ポップアップalertControllerを押すと、キーウィンドウに表示されるプロンプトボックスが表示されなかったのを保存します。何が起こっていますか?UIAlertControllerの後のキーウィンドウのビューを表示するには
//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) {
}];
}
は、あなたの答えをありがとう試してみてください!それは動作しません。 keywindowとkeyWindow.rootViewController.viewに違いはありますか? –
更新を参照してください...... –
ありがとうございます!しかし、私は理由を知らない。 –