Inferis/ViewDeck — pull request #140 by cbpowell (2012-09-12 02:34:42+00:00)
Title: Bouncing preview of left/right panes

I thought a feature that allows you to "preview" the side panes with a bouncing animation might be a cool addition, similar to iOS 5's reaction to tapping (not dragging) the camera button on the lock screen.

I've added `bounceLeftView` and `bounceRightView` methods, along with sibling methods with increasing levels of adjustability, which trigger the center view to be kicked away from the center position, and bounce back against the left/right edge. The bouncing animation is based on the model for a single degree of freedom mass-spring-dashpot system, and the first (largest) bounce distance, animation duration, and damping factor (bounciness) can be tailored via method arguments. Mid-animation panning actions by the user are also handled gracefully, stopping the animation and quickly changing to the current panning offset.

The downside is this uses CAKeyframeAnimation which requires QuartzCore.framework, so that may or may not be a sticking point for you. In any case, check out the updated demo with "bounce" buttons on the navbar!