首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 移动开发 > 移动开发 >

分享一个展示Alert的宏,以后弹对话框只要一句话就OK 了

2013-04-02 
分享一个显示Alert的宏,以后弹对话框只要一句话就OK 了分享一个显示Alert的宏,以后弹对话框只要一句话就OK

分享一个显示Alert的宏,以后弹对话框只要一句话就OK 了

分享一个显示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;\}\\


热点排行