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

Overview

Dispatched by subclasses of PXInteractiveObject an associated touch begins, ends, moves, or cancels. The event has information needed by the user to handle the touch correctly.

Tasks

  •   nativeTouch

    The touch object used for keeping track of what finger started the touch.

    property
  •   captured

    Indicates if the touch which triggered this event has been captured by the target. The object which captured the event will usually be a PXInteractiveObject for which the [PXInteractiveObject captureTouches] property has been set to YES. If captured equals YES, the [PXTouchEvent target] property will represent the object which captured this touch.

    property
  •   insideTarget

    Returns YES if the touch is contained within the bounds of the target.

    property
  •   stageX

    The horizontal location in global (stage) coordinates where the touch occured.

    property
  •   stageY

    The vertical location in global (stage) coordinates where the touch occured.

    property
  •   localX

    The horizontal location in local (target) coordinates where the touch occured.

    property
  •   localY

    The vertical location in local (target) coordinates where the touch occured.

    property
  •   stagePosition

    The location in global (stage) coordinates where the touch occured.

    property
  •   localPosition

    The location in local (target) coordinates where the touch occured.

    property
  •   tapCount

    The number of touches that have been repeated in the same place without moving.

    property
  • – initWithType:nativeTouch:stageX:stageY:tapCount:

    Creates a touch event.

Properties

captured

Indicates if the touch which triggered this event has been captured by the target. The object which captured the event will usually be a PXInteractiveObject for which the [PXInteractiveObject captureTouches] property has been set to YES. If captured equals YES, the [PXTouchEvent target] property will represent the object which captured this touch.

@property (nonatomic, readonly) BOOL captured

Declared In

PXTouchEvent.h

insideTarget

Returns YES if the touch is contained within the bounds of the target.

@property (nonatomic, readonly) BOOL insideTarget

Declared In

PXTouchEvent.h

localPosition

The location in local (target) coordinates where the touch occured.

@property (nonatomic, readonly) PXPoint *localPosition

Declared In

PXTouchEvent.h

localX

The horizontal location in local (target) coordinates where the touch occured.

@property (nonatomic, readonly) float localX

Declared In

PXTouchEvent.h

localY

The vertical location in local (target) coordinates where the touch occured.

@property (nonatomic, readonly) float localY

Declared In

PXTouchEvent.h

nativeTouch

The touch object used for keeping track of what finger started the touch.

@property (nonatomic, readonly) UITouch *nativeTouch

Declared In

PXTouchEvent.h

stagePosition

The location in global (stage) coordinates where the touch occured.

@property (nonatomic, readonly) PXPoint *stagePosition

Declared In

PXTouchEvent.h

stageX

The horizontal location in global (stage) coordinates where the touch occured.

@property (nonatomic, readonly) float stageX

Declared In

PXTouchEvent.h

stageY

The vertical location in global (stage) coordinates where the touch occured.

@property (nonatomic, readonly) float stageY

Declared In

PXTouchEvent.h

tapCount

The number of touches that have been repeated in the same place without moving.

@property (nonatomic, readonly) unsigned tapCount

Declared In

PXTouchEvent.h

Instance Methods

initWithType:nativeTouch:stageX:stageY:tapCount:

Creates a touch event.

- (id)initWithType:(NSString *)type nativeTouch:(UITouch *)touch stageX:(float)stageX stageY:(float)stageY tapCount:(unsigned)tapCount

Parameters

type

A string representing the type of the event.

stageX

The horizontal location in global (stage) coordinates where the touch occured.

stageY

The vertical location in global (stage) coordinates where the touch occured.

tapCount

The number of touches that have been repeated in the same place without moving.

nativeTouch

The touch object used for keeping track of what finger started the touch.

Declared In

PXTouchEvent.m