Inherits from Button : TouchableNode : CCNode : NSObject
Declared in ImageButton.h

Overview

A button with a convenience method to use a sprite as the touchable portion.

Tasks

Class Methods

buttonWithImageFile:target:selector:

Create a new image button.

+ (id)buttonWithImageFile:(NSString *)filename target:(id)target selector:(SEL)selector

Parameters

filename

the filename of the image to use as a touchable portion.

target

the target to notify when the button is pressed.

selector

the selector to call when the button is pressed.

Return Value

a new button.

Declared In

ImageButton.h

Instance Methods

initWithImageFile:target:selector:

Initialize an image button.

- (id)initWithImageFile:(NSString *)filename target:(id)target selector:(SEL)selector

Parameters

filename

the filename of the image to use as a touchable portion.

target

the target to notify when the button is pressed.

selector

the selector to call when the button is pressed.

Return Value

the initialized button.

Declared In

ImageButton.h