Inherits from UIView
Conforms to NSCoding
Declared in PXView.h
PXView.m

Overview

A UIView subclass that provides a mechanism to create a Pixelwave rendering surface which acts as the root of the entire engine.

Although the view’s render area may be set to any value, it is highly recommended to set the view’s frame to be the same size as the screen.

Once instantiated, a PXView starts up all of the engine’s subsytems and initializes the display list, providing a default stage and root display object. To change the application’s root object use the root property.

Only one PXView should exist for the duration of your app.

Tasks

Other Methods

Other Methods

Properties

colorQuality

The color quality the view was created with. This is a read-only property and may only be set at initialization.

@property (nonatomic, readonly) PXViewColorQuality colorQuality

Declared In

PXView.h

contentScaleFactor

See iOS API docs for UIView.contentScaleFactor

@property (nonatomic) float contentScaleFactor

Declared In

PXView.h

root

The root display object of the Pixelwave engine.

@property (nonatomic, retain) PXDisplayObject *root

Declared In

PXView.h

stage

The global stage of the Pixelwave engine.

@property (nonatomic, readonly) PXStage *stage

Declared In

PXView.h

Instance Methods

initWithFrame:

The size of the newly created view.

- (id)initWithFrame:(CGRect)frame

Parameters

frame

The size of the newly created view.

Declared In

PXView.m

initWithFrame:colorQuality:

The size of the newly created view.

- (id)initWithFrame:(CGRect)frame colorQuality:(PXViewColorQuality)_colorQuality

Parameters

frame

The size of the newly created view.

colorQuality

The quality to use for the underlying OpenGL rendering surface. This value must be one of the possible values defined in PXViewColorQuality. The default value is PXViewColorQuality_Medium.

Declared In

PXView.m

initWithFrame:contentScaleFactor:

The size of the newly created view.

- (id)initWithFrame:(CGRect)frame contentScaleFactor:(float)_contentScaleFactor

Parameters

frame

The size of the newly created view.

contentScaleFactor

The multiplier value by which the contents of the view should be scaled. This value usually corresponds to the contentScaleFactor of the device. Pass 0.0 to use the default value.

Declared In

PXView.m

initWithFrame:contentScaleFactor:colorQuality:

The size of the newly created view.

- (id)initWithFrame:(CGRect)frame contentScaleFactor:(float)_contentScaleFactor colorQuality:(PXViewColorQuality)_colorQuality

Parameters

frame

The size of the newly created view.

colorQuality

The quality to use for the underlying OpenGL rendering surface. This value must be one of the possible values defined in PXViewColorQuality. The default value is PXViewColorQuality_Medium.

contentScaleFactor

The multiplier value by which the contents of the view should be scaled. This value usually corresponds to the contentScaleFactor of the device. Pass 0.0 to use the default value.

Declared In

PXView.m

screenshot

A screen grab of the current state of the main display list, as a UIImage.

- (UIImage *)screenshot

Discussion

Please note that this is a fairly expensive method to execute, and shouldn’t be used for real-time effects to avoid a performance hit.

This method is generally intended for debugging purposes, but can be safely used in production.

Declared In

PXView.m