README.markdown

PSPushPopPressView

PSPushPopPressView is a custom view that provides direct manipulation for your content - like the images and videos in Our Choice by Push Pop Press. All credit for coming up with the interaction and use of such an interaction goes to Push Pop Press. This view tries to imitate the interaction they have perfected in Our Choice.

Credits go to Martin Reichart by Blacksmith Software, who sent me a initial implementation.

Be sure to test this on an real iPad, not the Simulator - it's much more awesome to feel it. And use all of your fingers, you can manipulate multiple views concurrently!

Zoom, Rotate, Drag - everything at the same time. In this example, the background is zoomed out and transparency is added while the transform is active.

Features

Two-finger direct manipulation support to scale, pan and rotate

Tap support to go into fullscreen and back to the original frame (delegate can block this individually and this is also disabled if you add a button as a subview and the user tapped the button)

Fully animates when going into fullscreen or back to the view's original frame

Semi-realistic bounce effect for scale and position depending on "distance" of view relative to it's target appearance (e.g. when the view needs to move a lot back to it's position there is more bounce than we the view only needs to move a little; also applied to changes in scale)

Detaches from the current view and docks on the main view, so that your view always expands to the full screen. This is especially useful if you're adding PSPushPopPressView's in a complex view hierarchy.

ARC

PSPushPopPressView uses ARC and works with iOS 4.0 upwards. You need at least Xcode 4.2 with LLVM 3.0 to compile it.

How to use it

Create an instance of PSPushPopPressView, insert it into your view hierarchy and you're done.

You can add any UIView to the container. Just make sure it's autoresizable (else it won't look that great).
Also note that adding subviews which offer userInteraction on their own (e.g. UIWebView or UIScrollView) might mess up the interaction with the view.