1

I'm using custom transition, UIViewControllerAnimatedTransitioning. I've been able to animate whole controllers for push and pop.
But I need another thing: shrink some header view and stretch selected table cell and add some text to stretched cell. That will be my pushed controller.

How can I achieve this, when part of my pushed controller is coming from storyboard and another part from previous controller?

Can't find any tutorial for this. Only how to animate whole controllers.

upd:
I've seen this answer: https://stackoverflow.com/a/23580502/1400119 but it's not helped me a lot.

upd2:
finally achieved the goal. Here is links to blogposts and repos that helped me a lot, maybe they will help someone too:
UINavigationControllerDelegate apple doc
UIViewControllerContextTransitioning apple doc

How to animate image in tableview to extend and open another view controller simultaneously?
Navigation controller custom transition animation

http://captechconsulting.com/blog/tyler-tillage/ios-7-tutorial-series-custom-navigation-transitions-more http://dativestudios.com/blog/2013/09/29/interactive-transitions/
http://www.objc.io/issue-12/custom-container-view-controller-transitions.html

https://github.com/mariohahn/MHVideoPhotoGallery

Community
  • 1
  • 1
trickster77777
  • 1,198
  • 2
  • 19
  • 30
  • Maybe those links can get a better place in the tag-wiki's (if they existed yet) or maybe you could self answer your queastion (but don't only post the links because that answer wil be deleted) – rene Nov 17 '14 at 20:08

1 Answers1

1

Use the animation on the table cell. Like i've done for the collection view in the following example.

 [UIView animateWithDuration:.1 delay:0.0 options:UIViewAnimationOptionCurveLinear animations:^{
            [_collectionView setAlpha:1];
        }
        completion:^(BOOL finished) {
            [UIView animateWithDuration:.5 delay:0.0 options:UIViewAnimationOptionCurveEaseIn animations:^{
                _collectionView.center = CGPointMake(160, 528);

            }
            completion:^(BOOL finished) {
            }];
        }];
Federica Venuto
  • 582
  • 4
  • 15
  • It's just changing some properties for a view. And do not actually work in animateTransition:(id )transitionContext I'm wondering about how to pass one view, with animation, from first controller to the second? Like Pinterest app is acting with its cells. – trickster77777 Nov 12 '14 at 19:02
  • I think that you can use it in -(void)viewWillAppear:(BOOL)animated of the pushed controller. After the end of transitioning, animating the elements you need to animate. – Federica Venuto Nov 13 '14 at 11:38
  • I need this animation: http://youtu.be/ICUP16plZDI?t=1m34s it is actually done instead of standard push animation, and it can not be done in any of "appear-disappear" methods. It seems like I need to make a snapshot of every view I need to animate and simulate animation ( – trickster77777 Nov 13 '14 at 17:31