Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @implementation TestBedViewController
- - (void) performDismiss
- {
- [baseAlert dismissWithClickedButtonIndex:0 animated:NO];
- }
- - (void) action: (UIBarButtonItem *) item
- {
- baseAlert = [[[UIAlertView alloc]
- initWithTitle:@"Please Wait" message:nil
- delegate:self cancelButtonTitle:nil
- otherButtonTitles: nil] autorelease];
- [baseAlert show];
- // Create and add the activity indicator
- UIActivityIndicatorView *aiv = [[UIActivityIndicatorView alloc]
- initWithActivityIndicatorStyle:
- UIActivityIndicatorViewStyleWhiteLarge];
- aiv.center = CGPointMake(baseAlert.bounds.size.width / 2.0f,
- baseAlert.bounds.size.height - 40.0f);
- [aiv startAnimating];
- [baseAlert addSubview:aiv];
- [aiv release];
- // Auto dismiss after 3 seconds
- [self performSelector:@selector(performDismiss) withObject:nil
- afterDelay:3.0f];
- }
- // ...Other
- @end
Add Comment
Please, Sign In to add comment