/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

  1. //
  2. // ImageButton.m
  3. //
  4. // Created by Karl Stenerud on 10-05-29.
  5. //
  6. #import "ImageButton.h"
  7. #pragma mark ImageButton
  8. @implementation ImageButton
  9. #pragma mark Object Management
  10. + (id) buttonWithImageFile:(NSString*) filename target:(id) target selector:(SEL) selector
  11. {
  12. return [[[self alloc] initWithImageFile:filename target:target selector:selector] autorelease];
  13. }
  14. - (id) initWithImageFile:(NSString*) filename target:(id) targetIn selector:(SEL) selectorIn
  15. {
  16. CCSprite* sprite = [CCSprite spriteWithFile:filename];
  17. return [super initWithTouchablePortion:sprite target:targetIn selector:selectorIn];
  18. }
  19. @end