UIAlertView的使用注意事项

1、当button 小于等于两个时,只会平行的显示button,除非标题特长,这样不方便展示
当button大于等于3个的时候,每行显示一个button,这样平行显示,界面统一

2、为了使UIAlertView的message显得有调理,不能用 在每个想换行的位置直接使用\n的方式。
要使用如下方式,stringWithFormat的方式构建

NSString
*string1=@"total time played:30\n";
   
NSString*string2=@"total score :90\n";
   
NSString*string3=@"19/2/20010 12:00:77\n";
   
NSString*string=[NSString stringWithFormat:@"%@%@%@",string1,string2,string3];
   
UIAlertView*progressAlert =[[UIAlertView alloc] initWithTitle:@"Hello" message:string delegate:nil cancelButtonTitle:@"ok" otherButtonTitles:nil];
   
[progressAlert show];
   
[progressAlert release];

http://stackoverflow.com/questions/5787020/uialertview-show-multiple-message
原文地址:https://www.cnblogs.com/easonoutlook/p/2642787.html