0
我知道addButtonWithTitle函数,但我不想创建新的按钮,只能填充UIActionSheet中的标题区域。Objective C UIActionSheet是否可以使用NSArray填充标题?
如果可能的话,是否可以使用UIAlertView?
我知道addButtonWithTitle函数,但我不想创建新的按钮,只能填充UIActionSheet中的标题区域。Objective C UIActionSheet是否可以使用NSArray填充标题?
如果可能的话,是否可以使用UIAlertView?
NSMutableString *mstr = [[NSMutableString alloc]init];
for (NSString *s in array)
[mstr appendString:s];
UIActionSheet*actionSheet = [[UIActionSheet alloc] initWithTitle:mstr ......
[actionSheet showInView:view];
[actionSheet release];
[mstr release];
这是假设你的数组包含字符串。 UIAlertView的类似方法。
谢谢,它的工作!顺便说一下,我把它改成了'[mstr appendString:[NSString stringWithFormat:@“%@ \ n”,s]];' – wagashi
是的,不确定你是否在字符串中有换行符,不用担心;) – Skela