I have a main animation block where I call a method that will load the view controller. There is a custom transition between two view controllers. However, when the view controller creates an interface, it all depends on the main animation. Although this leads to some interesting effects, I don't want this;)
[UIView beginAnimations:@"jump to view controller" context:self];
[UIView setAnimationDuration:0.55];
[UIView setAnimationCurve:UIViewAnimationCurveEaseOut];
[self loadViewControllerForIndex:targetIndex];
UIViewController *controller = [viewControllers objectAtIndex:targetIndex];
[controller viewWillAppear:YES];
[controller viewDidAppear:YES];
[UIView commitAnimations];
Unfortunately, I cannot get this part out of the block.
source
share