views:

1754

answers:

2

I don't really like that flip-transition. It's boring. I'd like to see something cool, like water effect, fog, or whatever. Is there something available or do I have to (re)invent the wheel for that?

+4  A: 

The animation types available via [CATransition animation] are:

  • kCATransitionFade
  • kCATransitionPush
  • kCATransitionMoveIn
  • kCATransitionReveal
  • @"suckEffect"
  • @"spewEffect"
  • @"genieEffect"
  • @"unGenieEffect"
  • @"rippleEffect"
  • @"twist"
  • @"tubey"
  • @"swirl"
  • @"charminUltra"
  • @"zoomyIn"
  • @"zoomyOut"

The transition types available via [UIView setAnimationTransition:forView:cache:] are:

  • UIViewAnimationTransitionFlipFromLeft
  • UIViewAnimationTransitionFlipFromRight
  • UIViewAnimationTransitionCurlUp
  • UIViewAnimationTransitionCurlDown
rpetrich
the first list is hidden API, right? What's apple gonna do when I use that? I'm pretty sure I've seen once an App using the rippleEffect. Exactly the same one from the foto app when watching the slide show (old iPod touch).
Thanks
The transitions defined by kCATransition* (and their subtypes) are public, the others are hidden. If you don't want to use private APIs you can try animating the transform property of your CALayer to imitate some of the hidden transitions.
rpetrich
Do you have experience using the hidden API transitions? Did Apple still accept them? I wonder if they would even be able to know that you use hidden api...
Thanks
It's hit and miss from what I understand. I haven't used any private CATransitions in any of my apps, but there are definitely some up on the store that use them. It's a relatively safe private API to use because if you use a transition type that is unavailable, UIKit fails gracefully by showing a fade transition instead of crashing.
rpetrich
Is Charmin Ultra a big (but soft and gentle) swiping movement?
Chris S
+1  A: 

The iPhone SDK comes with a whole bunch of built in animations. rpetrich listed some of them and I do believe that there are more.

For example using the UINavigationController class provides stock animation which, while simple, is quite effective.

Frank V
what's "stock animation"?
Thanks
Animations that are built in to the SDK.
Frank V