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

 

posted @ 2016-10-27 09:15  新年新气象  阅读(336)  评论(0编辑  收藏  举报