2012-03-21

question #6 - iPhone.

Originally Posted By: carlos
@interface ViewController : UIViewController

//text field that holds new word
@property (retain, nonatomic) IBOutlet UITextField *wordTextField;

//text field that holds new word's definition
@property (retain, nonatomic) IBOutlet UITextField *definitionTextField;

//gets rid of kyboard when touching background
//it's hooked in the Interface Builder to the background
//or any object that is to call this function
-(IBAction)backgroundClick:(id)sender;

@end


@implementation ViewController

@synthesize wordTextField;
@synthesize definitionTextField;

-(IBAction)backgroundClick:(id)sender
{
[wordTextField resignFirstResponder];
[definitionTextField resignFirstResponder];
}

@end
'''Originally Posted By: carlos''' @interface ViewController : UIViewController<br><br>//text field that holds new word<br>@property (retain, nonatomic) IBOutlet UITextField *wordTextField;<br><br>//text field that holds new word's definition<br>@property (retain, nonatomic) IBOutlet UITextField *definitionTextField;<br><br>//gets rid of kyboard when touching background<br>//it's hooked in the Interface Builder to the background<br>//or any object that is to call this function <br>-(IBAction)backgroundClick:(id)sender;<br><br>@end<br><br><br>@implementation ViewController<br><br>@synthesize wordTextField;<br>@synthesize definitionTextField;<br><br>-(IBAction)backgroundClick:(id)sender<br>{<br> [wordTextField resignFirstResponder];<br> [definitionTextField resignFirstResponder];<br>}<br><br>@end

-- question #6 - iPhone
Originally Posted By: carlos
Group members:
Arshi
Carlos
Chinmayee
'''Originally Posted By: carlos''' Group members:<br>Arshi<br>Carlos<br>Chinmayee
X