开发者

Objective C UIActionSheet is it possible to fill Title with a NSArray?

开发者 https://www.devze.com 2023-04-11 19:00 出处:网络
I know about addButtonWithTitle function, but I dont want to create new buttons, only to fill the Title area in an UIActionSheet开发者_开发技巧.

I know about addButtonWithTitle function, but I dont want to create new buttons, only to fill the Title area in an UIActionSheet开发者_开发技巧.

If it is possible, is it possible with 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];

This is assuming yer array contains strings. Similar approach for UIAlertView.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号