============================================================
博文原创,转载请声明出处
电子咖啡(原id蓝岩)
============================================================
分享一个显示Alert的宏,以后弹对话框只要一句话就OK 了,不多说,上代码
// // simplify the UIAlertView using // #define Alert(messageId) \ {\ UIAlertView * alert = [[UIAlertView alloc]\ initWithTitle:nil\ message:[Resource getUIStringForKey:messageId inFile:nil]\ delegate:nil\ cancelButtonTitle:[Resource getUIStringForKey:@"alert.ok" inFile:nil]\ otherButtonTitles:nil];\ \ [alert show];\ alert = nil;\ }\ \ #define Alert2(messageText) \ {\ UIAlertView * alert = [[UIAlertView alloc]\ initWithTitle:nil\ message:messageText\ delegate:nil\ cancelButtonTitle:[Resource getUIStringForKey:@"alert.ok" inFile:nil]\ otherButtonTitles:nil];\ \ [alert show];\ alert = nil;\ }\ \