2011-10-10 43 views

回答

1
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的類似方法。

+0

謝謝,它的工作!順便說一下,我把它改成了'[mstr appendString:[NSString stringWithFormat:@「%@ \ n」,s]];' – wagashi

+0

是的,不確定你是否在字符串中有換行符,不用擔心;) – Skela

相關問題