I'm looking for a way, to automatically dismiss an alert view after some time or after a task is done. Is there a possibility? (or another way to show a message for some time?)
1. From the Alerts tab, under Alerts, click Inbox. 2. On the Alerts Inbox page, click the check boxes in front of the alerts you want to dismiss, then click the Dismiss button.
Step 1 − Open Xcode and create a single view application and name it UIAlertSample. So basically, when we tap on the button an alert will be displayed, when the user taps outside the alert the alert will be dismissing.
You can dismiss the alert by calling dismissViewControllerAnimated method on alertController object.
You can call the -dismissWithClickedButtonIndex:animated:
method to dismiss the alert view.
To dismiss it automatically, create an NSInvocation and then use -performSelector:withObject:afterDelay:
to -invoke
it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With