How to open a transition dialog after a save action?

Hi, I just want to know how to add a transient dialog saying that the action is in progress.

for example, when the user clicks the Save button and you pop up and the window disappears in less than a second?

thanks in advance

+4
source share
1 answer

Use an action table, for example:

/* 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]; } 

Define UIActionSheet *loadingActionSheet; in your header and use @property and @synthesize .

You will also need to implement the UIActionSheetDelegate in your header.

+2
source

All Articles