Is there a way to use custom segues to individually animate several different subviews.
For example, I want my modal view to appear by the UINavigationBar fading in (as the source destination’s UINavigationBar fades out) and then a UITableView to slide down the screen ‘over’ the source destination’s view controller.
When I try to implement this in the - (void)perform method. My properties don’t animate using [UIView animateWithDuration: animations: completion:].
Can anyone provide me with a solution?
Thanks in advance!
You can certainly use custom segues to achieve this – however, I don’t think you’ll get much help without more details about the setup of your view controllers.
Everything you describe is correct: to create a custom segue you animate the views inside your
sourceViewControlleranddestinationViewControllerinside the segue’sperform:method. If they’re not animating you might want to check that your segue is actually getting called (you can use breakpoints in the debugger to check this), or that the views you’re trying to access inside your view controllers actually exist at that point in time (again, something you can check using the debugger).For a solution specific to your app you’re almost certainly going to have to provide more details about the two view controllers you’re trying to transition between. Perhaps you could post your
perform:method.