Page curl & turn effects for iPhone Development - iphone

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

Related

How can I make a grid similar to iphone/ipads launcher screen?

I have seen a few grids made with UITableView but I don't really like how close together each cell is to the other. If there is a way of creating a grid system like the home screen on an iphone (the screen after it is unlocked) if would be great. I don't need an exact solution but a point in the right direction, maybe a set of libraries to look through would be great. I am running xcode 4.4.1
Thanks!
The key is UIScrollView has a paging mode (since could have more buttons than fit in the view). It's covered here's in Apple ocs:
http://developer.apple.com/library/ios/#documentation/WindowsViews/Conceptual/UIScrollView_pg/ScrollViewPagingMode/ScrollViewPagingMode.html
If you use that, each 'page' would have n buttons/views that when clicked would call a protocol/delegate call back for the consumer with the data to handle and it would evenly layout the UIView/buttons across that page view. Contact me if you want my sample.
You probably don't want to require iOS6 as a minimum requirement but if you do, you can do as H2CO3 suggested in the comment and us UICollectionview. Here's a tutorial: http://www.raywenderlich.com/22324/beginning-uicollectionview-in-ios-6-part-12
There's also some open source launchers that you can look into their code. Here's some (I'm sure there's more).
http://www.cocoacontrols.com/platforms/ios/controls/sespringboard
Code is at: https://github.com/sarperdag/SESpringBoard
Also: http://www.cocoacontrols.com/platforms/ios/controls/openspringboard
Use UICollectionView. You can create grid type views using that. It is available in iOS 6.
If you can target iOS 6+, use UICollectionView. It's one of the best new things in iOS for years and it will be as important as UITableView.
The layout you're asking for is only a few lines of code.
NSHipster has a good explanation of UICollectionViews and Ray Wenderlich has a good tutorial.
(There's lots of example code out there, but here's a very simple example project I did recently for another question involving UICollectionViews)

UIPageViewController curling effect required in iOS-4 [duplicate]

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.

iPhone SDK - Expanding Buttons like in the camera app

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

Customize Curl animation in iphone?

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.

Creating a tableview in the form of a 'film strip'

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.