Inherits from PXEvent : NSObject
Conforms to NSCopying
PXPooledObject
Declared in PXStageOrientationEvent.h
PXStageOrientationEvent.m

Overview

Dispatched by the main stage whenever an orientation change occurs on the device. The event has information needed by the user to handle the change correctly.

Tasks

Other Methods

Other Methods

Properties

afterOrientation

The new orientation of the stage.

@property (nonatomic, readonly) PXStageOrientation afterOrientation

Declared In

PXStageOrientationEvent.h

beforeOrientation

The old orientation of the stage.

@property (nonatomic, readonly) PXStageOrientation beforeOrientation

Declared In

PXStageOrientationEvent.h

Class Methods

orientationName:

Converts an orientation into it’s string representation.

+ (NSString *)orientationName:(PXStageOrientation)orientation

Parameters

orientation

The orientation

Return Value

The string representation of the orientation.

Example:

NSString *orientationString = [PXStageOrientationEvent orientationName:PXStageOrientation_Portrait];
// orientationString = @"portrait"

Declared In

PXStageOrientationEvent.m

Instance Methods

initWithType:bubbles:cancelable:beforeOrientation:afterOrientation:

Creates a stage orientation event.

- (id)initWithType:(NSString *)type bubbles:(BOOL)bubbles cancelable:(BOOL)cancelable beforeOrientation:(PXStageOrientation)_beforeOrientation afterOrientation:(PXStageOrientation)_afterOrientation

Parameters

type

A string representing the type of the event.

bubbles

Describes whether the event participates in the bubbling phase of the event flow.

cancelable

Describes whether the behavior represented by the event may be canceled. If YES, [PXEvent preventDefault:] may be used.

beforeOrientation

The old orientation of the stage.

afterOrientation

The new orientation of the stage.

Declared In

PXStageOrientationEvent.m