每当我试图提出这个警告,它总是出现在某个奇怪的地方。有什么办法解决这个问题吗?
屏幕截图
UIAlertController* alert = [UIAlertController alertControllerWithTitle:@"Logout"
message:@"Are you sure you want to logout?"
preferredStyle:UIAlertControllerStyleAlert];
[alert addAction:[UIAlertAction actionWithTitle:@"Yes"
style:UIAlertActionStyleDestructive
handler:^(UIAlertAction * _Nonnull action) {
[[NSUserDefaults standardUserDefaults] setBool:@"NO" forKey:@"auth"];
[(AppDelegate *)[UIApplication sharedApplication].delegate changeRootViewController:[Login sharedLogin]];
}]];
[alert addAction:[UIAlertAction actionWithTitle:@"No"
style:UIAlertActionStyleCancel
handler:^(UIAlertAction * _Nonnull action) {
[alert dismissViewControllerAnimated:YES completion:nil];
}]];
[self presentViewController:alert animated:YES completion:nil];发布于 2016-03-12 06:03:11
我想你把窗框改成了两倍宽和高,所以它显示在那里。你可以把这个记录下来看看。
https://stackoverflow.com/questions/35954210
复制相似问题