I've modified the ViewTransitions app to use kCAScrollHorizontally. I've set transition in the app delegate to use kCATransitionPush rather than kCATransitionFade. However, I still get fading in and out. How can I get the views to slide in landscape just like the Star Trek app (http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=305916616&mt=8)?
-
I've got it working now using the example found on p.343 of 'iPhone SDK Application Development' by Zdziarski. – 4thSpace May 20 '09 at 14:15
-
It would be good to post your solution as an answer and then accept it. – U62 Jun 12 '09 at 12:26
-
Sorry but it's a few pages of code. – 4thSpace Jun 12 '09 at 17:27
2 Answers
I've done transitions like this before. Basically I have a big view that takes up the screen, with another view (the actual screen content) embedded within it. When I want to slide in a new page either from the left or right, I'll take the next page of content, place it offscreen, and embed it in the big backing view. Then I'll just animate (using a simple [UIView beginAnimations:context:]
to change the frames of both pages simultaneously (really just changing the origins of the frames). The offscreen view slides to where the current view is, and the current view slides to an offscreen position. Once offscreen, I'll remove it from its superview. Works like a charm.

- 242,470
- 58
- 448
- 498
The simulator will still fade out rather than performing some complex transitions...
Did you try it on the device?

- 25,929
- 31
- 126
- 154