views:

86

answers:

1

I want an animation of push between two sub views, just like ScrollView paging mode.

I know I can use UIScrollView directly, but the logic there is not so same with my program.

Anyway, I can use kCATransitionPush animation, but the bad thing of that is it does fading while pushing.

I really hate that fading, can anyone pls tell me how to remove that fading??

or how to do a UIScrollView-like paging pushing between two sub views?

Thanks very much.

+1  A: 

Just use normal UIView animations. You can use block-based animations, but I prefer the "traditional" style since it works on 3.0:

CGRect pageFrame = currentPage.frame;
CGFloat pageWidth = CGRect.size.width;
nextPage.frame = CGRectOffset(pageFrame,pageWidth,0);
[UIView beginAnimations:nil context:NULL];
currentPage.frame = CGRectOffset(pageFrame,-pageWidth,0);
nextPage.frame = pageFrame;
[UIView commitAnimations];
tc.