Posts

Showing posts from April, 2014

How to pushViewController with grow up animation

Just add this code to your file. @implementation UINavigationController (Dummy) -( void )enlarge:( UIViewController *)controller fromView:( UIView *)view animated:( BOOL )animated {     UIImageView *imageV=[ self takeSnapshot :controller];     CGRect sourceFrame=view. frame ;     CGRect destFrame=controller. view . frame ;     [imageV setFrame :sourceFrame];     [ self . view addSubview :imageV];          [ UIView animateWithDuration : 0.3 animations :^{         [imageV setFrame :destFrame];     } completion :^( BOOL finished) {         [ self pushViewController :controller animated : NO ];         [imageV removeFromSuperview ];     }]; } -( UIImageView *)takeSnapshot:( UIViewController *)controller {          UIGraphicsBeginImageContext ( self . vie...