私はここで関連するすべての記事をほぼ読んでいますが、警告を消すことはできません。誰も助けることができますか?それほど難しくはありません...UIAlertViewControllerの警告モーダルはUIAlertActionを追加しても解除できません
P.S. DEFAULTACTIONのコールバックでは、私は両方を試してみました:
#import "ViewController.h"
@interface ViewController()
@property (strong, nonatomic) UIAlertController *alert;
@end
@implementation ViewController
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
}
- (void)viewDidAppear:(BOOL)animated {
UIAlertController* alert = [UIAlertController alertControllerWithTitle:@"Reminder"
message:@""
preferredStyle:UIAlertControllerStyleAlert];
self.alert = alert;
self.alert.message = @"You just logged in. The tab will be refreshed";
UIAlertAction* defaultAction = [UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action) {
[self dismissViewControllerAnimated:YES completion:^{
NSLog(@"webview is reloading...");
}];
}];
[self.alert addAction:defaultAction];
[self presentViewController:self.alert animated:YES completion:nil];
}
- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
@end
これはiOSシミュレータの問題です。それはNSLog(@ "ok ...")とうまく動作します。デバイス上のソリューション。今Appleに問題を提出しています... – lkahtz
これは主にアップルのバグであるので、私はこの質問をトピックとしてクローズすることに投票しています。できるだけ速やかにテクニカルサポートチケットを開きます。私が詳細を知る前に、私はこの質問を今閉じています。 – lkahtz