The iOS framework that grows only as fast as its documentation
NISnapshotRotation Class Reference

Overview

The NISnapshotRotation class provides support for implementing snapshot-based rotations on views.

You must call this object's rotation methods from your controller in order for the rotation object to implement the rotation animations correctly.

Inheritance diagram for NISnapshotRotation:
NITableViewSnapshotRotation

Tasks

Accessing the Delegate
id< NISnapshotRotationDelegatedelegate property
 
Creating a Snapshot Rotation Object
(id) - initWithDelegate:
 
Implementing UIViewController Autorotation
(void) - willRotateToInterfaceOrientation:duration:
 
(void) - willAnimateRotationToInterfaceOrientation:duration:
 
(void) - didRotateFromInterfaceOrientation:
 

Method Documentation

delegate

The delegate of the snapshot rotation object.

@property (nonatomic, weak) id<NISnapshotRotationDelegate> delegate;
Discussion

The delegate must adopt the NISnapshotRotation protocol. The NISnapshotRotation class, which does not retain the delegate, invokes each protocol method the delegate implements.

initWithDelegate:

Initializes a newly allocated rotation object with a given delegate.

- (id)initWithDelegate:(id<NISnapshotRotationDelegate>)delegate;
Discussion
Parameters
delegateA delegate that implements the NISnapshotRotation protocol.
Returns
A NISnapshotRotation object initialized with delegate.

willRotateToInterfaceOrientation:duration:

Prepares the animation for a rotation by taking a snapshot of the rotatingView in its current state.

- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration;
Discussion

This method must be called from your UIViewController implementation.

willAnimateRotationToInterfaceOrientation:duration:

Crossfades between the initial and final snapshots.

- (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration;
Discussion

This method must be called from your UIViewController implementation.

didRotateFromInterfaceOrientation:

Finalizes the rotation animation by removing the snapshot views from the container view.

- (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation;
Discussion

This method must be called from your UIViewController implementation.