Reputation: 5617
Is it possible to animate a UITableViewCell
so that when it is selected, it appears to come out of its table, shrink, and appear to disappear into a button on the Navigation Bar?
I feel like this is doable, but I am not sure where to begin.
Any pointers would be very much appreciated.
Upvotes: 0
Views: 168
Reputation: 7400
Assuming your view controller is in a UINavigationController
it's possible using UINavigationControllerDelegate
.
self.navigationcontroller.delegate = self
)-navigationController:animationControllerForOperation:fromViewController:toViewController:
and return an object that conforms to the UIViewControllerAnimatedTransitioning
protocol.-animateTransition:
you will be passed a parameter that conforms to UIViewControllerContextTransitioning
. This object will allow you to get a reference to the view controller you're transitioning to & from.As with most custom animations, this isn't a trivial thing but this should get you going down the right path. Hope this helps.
Upvotes: 1