Click here to support Nimbus development and make a donation at www.pledgie.com !
An iOS framework whose growth is bounded by O(documentation).
Device Orientation

Overview

For dealing with device orientations.

Examples

Use NIIsSupportedOrientation to Enable Autorotation

  - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation {
    return NIIsSupportedOrientation(toInterfaceOrientation);
  }

Functions

BOOL NIIsSupportedOrientation (UIInterfaceOrientation orientation)
UIInterfaceOrientation NIInterfaceOrientation (void)
CGAffineTransform NIRotateTransformForOrientation (UIInterfaceOrientation orientation)

Function Documentation

BOOL NIIsSupportedOrientation ( UIInterfaceOrientation  orientation)

For use in shouldAutorotateToInterfaceOrientation:

On iPhone/iPod touch:

Returns YES if the orientation is portrait, landscape left, or landscape right. This helps to ignore upside down and flat orientations.

On iPad:

Always returns YES.

Definition at line 28 of file NIDeviceOrientation.m.

UIInterfaceOrientation NIInterfaceOrientation ( void  )

Returns the application's current interface orientation.

This is simply a convenience method for [UIApplication sharedApplication].statusBarOrientation.

Returns:
The current interface orientation.

Definition at line 46 of file NIDeviceOrientation.m.

CGAffineTransform NIRotateTransformForOrientation ( UIInterfaceOrientation  orientation)

Creates an affine transform for the given device orientation.

This is useful for creating a transformation matrix for a view that has been added directly to the window and doesn't automatically have its transformation modified.

Definition at line 61 of file NIDeviceOrientation.m.

Generated for Nimbus by doxygen 1.7.4-20110629