Hi
I'm trying to have the number pad retract after the background it is tapped.
This is my ViewController.h
and this is my ViewController.m
I set the background to UIControl in interface builder and linked it from Touch down to File's Owner.
Any help appreciated
Thanks
I'm trying to have the number pad retract after the background it is tapped.
This is my ViewController.h
Code:
#import <UIKit/UIKit.h>
@interface control_funViewController : UIViewController {
UITextField *nameField;
UITextField *numberField;
}
@property (nonatomic, retain) IBOutlet UITextField *nameField;
@property (nonatomic, retain) IBOutlet UITextField *numberField;
- (IBAction)textFieldDoneEditing:(id)sender;
- (IBAction)backgroundTap:(id)sender;
and this is my ViewController.m
Code:
#import "control_funViewController.h"
@implementation control_funViewController
@synthesize nameField;
@synthesize numberField;
- (IBAction)textFieldDoneEditing:(id)sender{
[sender resignFirstResponder];
}
- (IBAction)backgroundTap:(id)sender {
[nameField resignFirstResponder];
[numberField resignFirstResponder];
}
- (void)dealloc {
[nameField release];
[numberField release];
[super dealloc];
}
@end
I set the background to UIControl in interface builder and linked it from Touch down to File's Owner.
Any help appreciated
Thanks