oc UIAlertController封装

#define SHOWALERT(MESSAGE) 
UIAlertController *alertController = [UIAlertController alertControllerWithTitle:@"提示" message:MESSAGE preferredStyle:UIAlertControllerStyleAlert]; 
UIAlertAction *okAction = [UIAlertAction actionWithTitle:@"确定" style:UIAlertActionStyleDefault handler:nil]; 
[alertController addAction:okAction]; 
UIViewController *vc = [UIApplication sharedApplication].windows[0].rootViewController;
[vc presentViewController:alertController animated:YES completion:nil];
原文地址:https://www.cnblogs.com/hualuoshuijia/p/6002699.html