tags:

views:

896

answers:

1

Hi,

I want to create a UIAlertView that will say that "...in progress". It will also show that UIActivityindicatorView on it. Could you let me know how can I do that?

Thanks.

+4  A: 

Its pretty simple. Just create a UIActivityIndicatorView and add it as a subview to the UIAlertView.

UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@" " message:@" " delegate:self cancelButtonTitle:nil otherButtonTitles:nil];
    UIActivityIndicatorView *progress= [[UIActivityIndicatorView alloc] initWithFrame:CGRectMake(125, 50, 30, 30)];
    progress.activityIndicatorViewStyle = UIActivityIndicatorViewStyleWhiteLarge;
    [alert addSubview:progress];
    [progress startAnimating];

    [alert show];
Brandon Schlenker
Thanks, it worked.
ebaccount