View image in full screen just like Facebook app on IOS

I want to make a transition when I touch the image to open full screen just like the Facebook app. When the user touches the image, the transition resets the image to the center, the user clicks on the image again, he returns to the previous page. How can i do this? At the moment I have 1 viewcontroller containing the image in the center. I have used the below code to create an animation when the view viewcontroller is clicked, but it seems to be wrong.

This is my code:

CATransition* transition = [CATransition animation];
transition.duration = 0.5;
transition.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut];
transition.type = kCATransitionFromTop; //kCATransitionMoveIn; //, kCATransitionPush, kCATransitionReveal, kCATransitionFade
//transition.subtype = kCATransitionFromTop; //kCATransitionFromLeft, kCATransitionFromRight, kCATransitionFromTop, kCATransitionFromBottom
[self.navigationController.view.layer addAnimation:transition forKey:nil];

      

[self.navigationController pushViewController: imageView animated: NO];

Please give me some advice. Thank.

+3
ios objective-c facebook animation uiimageview


source to share


No one has answered this question yet

Check out similar questions:

512
The developers of this app haven't configured this app correctly for Facebook login?
390
Design for Facebook authentication in an iOS app that also accesses a secure web service
38
Restore pre-iOS7 UINavigationController pushViewController animation
7
Facebook style to enlarge image from UITableView / Feed
2
Go to transparent controller transition mode
2
Switching from image scaling from UITableViewCell to UIViewController
1
Animating an image out of sight
1
How do I resize in full screen mode when touching a view that is in a TabBarController based app?
0
SetAlpha animation for UILabel not working
-1
animations in the same activity



All Articles
Loading...
X
Show
Funny
Dev
Pics