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