Attempting to load the view of a view controller while it is deallocating is not allowed and may result in undefined behavior ()
我遇見的問題即是UIAlertController事件沒加到控制器上,改為[[UIApplication sharedApplication].keyWindow.rootViewController presentViewController:alertVC animated:YES completion:nil];又遇見
'-[UIKeyboardTaskQueue waitUntilAllTasksAreFinished] may only be called from the main thread.'
再接著把這個加到主線程中,dispatch_async(dispatch_get_main_queue(), ^{
[[UIApplication sharedApplication].keyWindow.rootViewController presentViewController:alertVC animated:YES completion:nil];
解決了我的問題
});