/Classes/ImageButton.h

http://github.com/kstenerud/ObjectAL-for-iPhone · C Header · 32 lines · 7 code · 5 blank · 20 comment · 0 complexity · c548dd9a848f9150b01a3f557e505f43 MD5 · raw file

  1. //
  2. // ImageButton.h
  3. //
  4. // Created by Karl Stenerud on 10-05-29.
  5. //
  6. #import "Button.h"
  7. /**
  8. * A button with a convenience method to use a sprite as the touchable portion.
  9. */
  10. @interface ImageButton : Button
  11. {
  12. }
  13. /** Create a new image button.
  14. * @param filename the filename of the image to use as a touchable portion.
  15. * @param target the target to notify when the button is pressed.
  16. * @param selector the selector to call when the button is pressed.
  17. * @return a new button.
  18. */
  19. + (id) buttonWithImageFile:(NSString*) filename target:(id) target selector:(SEL) selector;
  20. /** Initialize an image button.
  21. * @param filename the filename of the image to use as a touchable portion.
  22. * @param target the target to notify when the button is pressed.
  23. * @param selector the selector to call when the button is pressed.
  24. * @return the initialized button.
  25. */
  26. - (id) initWithImageFile:(NSString*) filename target:(id) target selector:(SEL) selector;
  27. @end