0

I have a uitablewview based app where clicking on a cell will push a new view. What I would like to do it is rather than do a push animation to the new view, I would like to perform a page flip animation like that found in iBooks.

I presume I would have to create a uipageviewcontroller and use uitableview to turn the pages.

I'm not really sure how to code this though. Can anyone show me some code to get started with please

totalitarian
  • 3,606
  • 6
  • 32
  • 55

1 Answers1

0

You can use a UINavigationController and do the push/pop with animated == NO and instead use a custom animation. See this excellent post on how to do this: https://stackoverflow.com/a/5889757/289843

The animations for the page flip effect are UIViewAnimationTransitionCurlUp and UIViewAnimationTransitionCurlDown.

Community
  • 1
  • 1
Caffeine
  • 862
  • 7
  • 6
  • Brilliant! My only issue is that i'm using segues, so while I can animate the 'push' i'm not sure how to animate the 'pop' when the user clicks the back button that appears after the 'push'.... – totalitarian Jan 06 '13 at 11:48
  • The only way I can think of is to replace the backbutton on your view controller with a custom button. You can do this by assigning your custom button to .navigationItem.leftBarButtonItem. However this won't have the arrow shape of normal back buttons. – Caffeine Jan 06 '13 at 12:05