[Solved] Need help animating a view-switch
[Solved] Need help animating a view-switch
- Subject: [Solved] Need help animating a view-switch
- From: WT <email@hidden>
- Date: Fri, 27 Mar 2009 06:05:57 +0100
Hello again,
the solution was to replace the forView argument below
[UIView setAnimationTransition:
UIViewAnimationTransitionFlipFromLeft
forView: curViewController.view cache:
YES];
with its container view, which happens to be the window, in my case:
[UIView setAnimationTransition:
UIViewAnimationTransitionFlipFromLeft
forView: curViewController.view.window cache: YES];
I went back and read Apple's documentation again and, sure enough, the
answer was right there in the doc for UIView:
"If you want to change the appearance of a view during a transition—
for example, flip from one view to another—then use a container view,
an instance of UIView, as follows:
Begin an animation block.
Set the transition on the container view.
Remove the subview from the container view.
Add the new subview to the container view.
Commit the animation block."
_______________________________________________
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