首页 > 代码库 > oc UIAlertController封装

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];

 

oc UIAlertController封装