I have a method "test" that execute poptorootviewcontroller. I want to put some delay before the animation of poptorootviewcontroller. Here is my code :
-(void)test{
[UIView animateWithDuration:5.0
delay: 2.5
options: UIViewAnimationOptionCurveEaseIn
animations:^{
[self.navigationController popToRootViewControllerAnimated:NO];
}
completion:nil];
}
But it doesn't work. Any help? Thanks!