Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Delegate as external class in Objective-C

By: a guest on Feb 26th, 2012  |  syntax: None  |  size: 0.39 KB  |  views: 28  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. @interface Control1Delegate : NSObject <UITextFieldDelegate> {
  2. }
  3.  
  4. - (BOOL) textFieldShouldReturn:(UITextField *)textField;
  5.  
  6. @end
  7.        
  8. #import "Control1Delegate.h"
  9.  
  10. @implementation Control1Delegate
  11.  
  12. - (BOOL) textFieldShouldReturn:(UITextField *)textField {
  13.     [textField resignFirstResponder];
  14.     return YES;
  15. }
  16.  
  17. @end
  18.        
  19. @property (nonatomic, retain) IBOutlet Control1Delegate *control1delegate;
clone this paste RAW Paste Data