Is there a way, that I can present or dismiss my ViewController after a time of 5 seconds? Maybe like…If the user presses a button after 5 seconds the new view appears.
Any solutions or suggestions? Sorry but I didn’t found a solution on the web.
My code which doesnt work:
-(IBAction)lol:(id)sender {
[self performSelector:@selector(dissMissviewController) withObject:self afterDelay:3];
}
-(void)dissMissViewController{
[self dismissModalViewControllerAnimated:YES];
}
Thanks.
You can use below one..
I hope it may clears to you…!!!