I am trying to switch between UIViews by making it look like you are turning a page in a book.
The UIViewAnimationTransitionCurlUp is pretty close if I could get it to curl toward the Left or Right. Is this possible?
I have tried to use the CATRansition but none of the animation types come close to a page turning.
Any suggestions on how to create this page animation transition that would turn a page toward the left or right?
Edit (June 2012) : It is now possible to use the native Apple implementation, check:
Page View Controller: Note that this is available since iOS 5.0.
Also check this other libs/methods:
Leaves: Not so realistic, but really easy to use.
PageCurl: Really nice effect, easy to use.
Implementing iBooks page curling using a conical deformation algorithm: Amazing, but it's just a proof of concept, difficult to expand.
There's nothing in the SDK that will do this for you. If you want this effect, you'll have to roll your own. "Classics" does a nice job with the page-flip animation.
You can manage this effect by changing the orientation of the UIViewController where the animation takes place.
Related
I am curious as to whether or not there is an open source solution to replicate the flash button in the iOS camera applicaiton.
I have seem many other apps use this, but there doesn't seem to be a native way, so I assume there is a common source out there.
It is possible to get the flash button by using UIImagePickerController class, but most of the camera apps out there don't seem to be using this (or perhaps they subclass it, which is against apple's terms).
I am looking for a way to replicate the expanding behavior of the button. Any thoughts?
It doesn't sound too hard.
The way I'd do it is to separate the right curve of the button (as images), and make a UIView that has the left part of the button and the right curve as subviews.
When it's tapped, slide the right curve and animate the extra buttons in.
You could use a stretchable UIImage (see UIImage documentation) and then just animate the frame changing.
In the Apple 2010 WWDC Sample code (downloadable via iTunes, otherwise I'd post it here), there are several sample applications which use this control. They call the class ExpandyButton. I realize I'm answering my question, but hopefully someone out there can find this useful.
While looking for a similar solution to this problem I came across this code which was extremely helpful. Similar to ExpandyButton it fit my needs better.
https://github.com/ddebin/DDExpandableButton
I want to set animation for my UIView. I am using CurlUp animation for that. My requirement is to use CurlLeft and CurlRight. These are not available in CoreAnimation as I know. So is there any way by which I can handle the CurlLeft and CurlRight. I don't know a lot about OpenGl. But I don't have any problem with that too. Please guide me and provide me any link by which I can handle CurlLeft and right animation using either OpenGL or CoreAnimation.
Thanks a Lot.
For page turning animations, Ole Begemann has done something like that. His code is available on Github. See my answer to this question for a link.
iBook page flip transaction
His sample project is available for download and shows page curling left and right.
I'm looking for a very simple page turn effect, similar to the one in iBooks BUT much simpler. I only need the page to be turned if the user swipes the screen (so no difficult 'grabbing' the page animations etc. -- simply an animation). Actually, all I would need is the following with the exception that it should not CurlDown or CurlUp, but from the left side to the right side and vice versa:
[UIView setAnimationTransition:
UIViewAnimationTransitionCurlDown
forView:self.view cache:YES];
I had a look around an there are several tutorials on how to do more advanced page turns:
For iOS 5: Simply use UIPageViewController (see edit below)
For iPad: Page Curling -- looks perfect & beautiful, but quite advanced
For iPad: Page Curling -- right direction, but not as beautiful
For iPhone: Fancy 'Transparent' Curl (like iBooks) -- private API though (?)
Deconstructing the effect in Classics: Classics App
I guess there may be more tutorials and sample code and I was wondering if we could collect them here with a little description. And of course, I am particularly looking for that very simple page-turn effect similar to UIViewAnimationTransitionCurlDown/Up, only that it goes from right-to-left and not buttom-to-top.
Would it be easy to achieve a simple page turn effect with gradient overlays and a little 2-D animation? Or is this what the 'leaves' project is all about? Thanks for clarifications and updates of the list.
EDIT:
With iOS 5 you can now easily add iBooks like page turn effects. Simply open a new project and choose Page-based Application (you need xCode 4.2 and iOS 5 running).
I put an answer to this question about the status of Page Curl effect.
We worked on a filter based on OpenGL ES and CoreGraphics that looks really close to the iBooks one and it's App Store safe. The filter is finished, we're working on a simple and easy-to-use API to integrate the effects.
Take a look here http://api.mutado.com/mobile/paperstack/
you can try XBPageCurl project , its more mature than using paperstack and free
https://github.com/xissburg/XBPageCurl
I am developing an RSS-reader-type application. I am toying with the possibility of using a normal TableView application but showing the articles as a film-strip. I am mainly thinking for an iPad application (but possible it works on the smaller iPhone as well).
The idea is to have the cells passing/scrolling across the screen using swipe touches (but horizontal, and not vertical as with the normal TableView). They will be some-kind of miniatures of the full article, and when tapped (or with multi-touch zoom to have better control) can be enlarged to read. Then can then just be be moved on as soon as the user has seen enough of it.
Does anybody know if there is an easy way of accomplishing something like that?
The most obvious solution that springs to mind would be to use a UIScrollView, as this will provide the inertial effects, etc. for free - all you'd have to do it populate it with the relevant sub-views. (UITableView's actually use a UIScrollView.)
For more information and sample code, see Apple's UIScrollView docs.
If you want horizontal scrolling, take a look at Jeremy Tregunna’s JScrollingRow. It’s open source under a public domain licence.
Does anyone knows how to build a flip animation like the flipboard app?
Thanks
If you mean the page flip transition, have a look at the OpenGL transition class I wrote.
https://github.com/epatel/EPGLTransitionView
I added a couple of example transitions and one of them are a "page flip" transition.
Have a look at FlipView, it tries to replicate Flipboard app for iPad
Some of the features implemented are:
Multiple flip (just click on last pagination if u r at first or second for multi-flip).
Views arrangement if orientation changed like Flipboard
Selection of random layout
Hopefully this link is of some help to you :D
I remember from watching an interview with the CEO saying that all the flipping boards and the animations are done using HTML5! I can not find it now sorry :(
I managed to find the non-broken link to FlipView example on github: https://github.com/Reefaq/FlipView
Hope it helps
I've been looking for the same for weeks. If you use the 'origami' transition in the ipad's photo app, you'll see that it has a very similar flipboard effect. Though someone with much more programming chops can probably give you the specifics, I think they use core animation. In it, you can define the anchor point and basically transform the uiview along the z axis.