简体   繁体   中英

How to show a table in an alert iOS

So I have a label, and when I click on it, I want it to show sort of a table in an "alert" type pop-up window that allows you to scroll (since there will be quite a few lines of data) through values like this:

1) some value : correct
2) Some other value : incorrect

The data I have is stored in two different NSMutableArray s.

I know I can make an alert show with some code like this,

 UIAlertView *message = nil;

        message = [[UIAlertView alloc] initWithTitle:@"Definition"
                                             message:definition
                                            delegate:nil
                                   cancelButtonTitle:@"OK"
                                   otherButtonTitles:nil];
    [message show];

Is it possible to do this? If so, what should I look at?

Thanks

It will be a very bad solution - why not use modal controller instead?

Anyway, you can always add a subview to UIAlertView . However, note that changing its size could be complicated.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM