I tried the above methods, and no one can show the alert view, only when I put the presentViewController:
method in a dispatch_async
sentence:
dispatch_async(dispatch_get_main_queue(), ^ {
[self presentViewController:alert animated:YES completion:nil];
});
Refer to Alternative to UIAlertView for iOS 9?.