/Classes/ImageButton.m
http://github.com/kstenerud/ObjectAL-for-iPhone · Objective C · 27 lines · 14 code · 8 blank · 5 comment · 0 complexity · 4150e515490e16957b7d0a6039e5fb11 MD5 · raw file
- //
- // ImageButton.m
- //
- // Created by Karl Stenerud on 10-05-29.
- //
- #import "ImageButton.h"
- #pragma mark ImageButton
- @implementation ImageButton
- #pragma mark Object Management
- + (id) buttonWithImageFile:(NSString*) filename target:(id) target selector:(SEL) selector
- {
- return [[[self alloc] initWithImageFile:filename target:target selector:selector] autorelease];
- }
- - (id) initWithImageFile:(NSString*) filename target:(id) targetIn selector:(SEL) selectorIn
- {
- CCSprite* sprite = [CCSprite spriteWithFile:filename];
- return [super initWithTouchablePortion:sprite target:targetIn selector:selectorIn];
- }
- @end