Используйте лист действий следующим образом:
/* present a dialog */
-(void)showDialog {
loadingActionSheet = [[UIActionSheet alloc] initWithTitle:@"Something was saved!" delegate:nil cancelButtonTitle:nil destructiveButtonTitle:nil otherButtonTitles:nil];
[loadingActionSheet showInView:self.view];
[NSTimer scheduledTimerWithTimeInterval:1.5f target:self selector:@selector(closeActionSheet:) userInfo:nil repeats:NO];
}
/* close the actionsheet */
-(void)closeActionSheet:(id)sender {
[loadingActionSheet dismissWithClickedButtonIndex:0 animated:YES];
}
Определите UIActionSheet *loadingActionSheet;
в заголовке и используйте @property
& @synthesize
.
Вам также понадобится реализовать UIActionSheetDelegate
в вашем заголовке.