PXStageOrientationEvent Class Reference
| 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
-
beforeOrientationThe old orientation of the stage.
property -
afterOrientationThe new orientation of the stage.
property -
– initWithType:bubbles:cancelable:beforeOrientation:afterOrientation:Creates a stage orientation event.
Other Methods
-
+ orientationName:Converts an orientation into it’s string representation.
Properties
Class Methods
orientationName:
Converts an orientation into it’s string representation.
+ (NSString *)orientationName:(PXStageOrientation)orientationParameters
- orientation
The orientation
Return Value
The string representation of the orientation.
Example:
NSString *orientationString = [PXStageOrientationEvent orientationName:PXStageOrientation_Portrait];
// orientationString = @"portrait"
Declared In
PXStageOrientationEvent.mInstance 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)_afterOrientationParameters
- 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