Re: [iOS] How to add push animation to view controller without a navigation controller
Re: [iOS] How to add push animation to view controller without a navigation controller
- Subject: Re: [iOS] How to add push animation to view controller without a navigation controller
- From: Tharindu Madushanka <email@hidden>
- Date: Fri, 10 Dec 2010 18:19:44 +0530
Hi,
Thanks.
But. This works with two views appearing as pushed. But I would like to have
animation for my next view controller.
But with two view controllers when other view controller shown, how could we
present that with similar animation.
// animate up view with fade
CATransition *animation = [CATransition animation];
[animation setDuration:0.5];
[animation setType:kCATransitionPush];
[animation setSubtype:kCATransitionFromRight];
[animation setFillMode:kCAFillModeBoth];
[animation setTimingFunction:[CAMediaTimingFunction
functionWithName:kCAMediaTimingFunctionLinear]];
[[viewController.view layer] removeAllAnimations];
[[viewController.view layer] addAnimation:animation forKey:@
"pushAnimation"];
[[viewController.view layer]
setModalTransitionStyle:UIModalTransitionStyleCrossDissolve]; // this is the
nearest I could get :(
[self presentModalViewController:viewController animated:YES];
But still it looks like dissolved and pushed.. not a real push ? :( How
could we do this with two view controllers ?
Thanks a Lot,
Tharindu
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden