SHARE
TWEET

Delegate as external class in Objective-C

a guest Feb 26th, 2012 28 Never
  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;
RAW Paste Data
Top