Hi,
When i edited the text,the keypad is open.But it has no done button to close the keypad.
So,i create a button and write the below code.
//When done buton click
- (IBAction)doneButtonOnKeyboardPressed: (id)sender
{
[textField resignFirstResponder];
}
- (BOOL)textFieldShouldReturnUITextField *)theTextField {
if(theTextField == textField)
[textField resignFirstResponder];
return YES;
}
So i want to display this button when keypad open(When the page load it should be hidden)
I tried this in,
- (void)viewDidLoad {
button.hidden=true;
}
But its not working.
Can anybody please tell me the code?
1)To hide the button when view load.
2)To display button when keypad opens.
Thanks
judy
When i edited the text,the keypad is open.But it has no done button to close the keypad.
So,i create a button and write the below code.
//When done buton click
- (IBAction)doneButtonOnKeyboardPressed: (id)sender
{
[textField resignFirstResponder];
}
- (BOOL)textFieldShouldReturnUITextField *)theTextField {
if(theTextField == textField)
[textField resignFirstResponder];
return YES;
}
So i want to display this button when keypad open(When the page load it should be hidden)
I tried this in,
- (void)viewDidLoad {
button.hidden=true;
}
But its not working.
Can anybody please tell me the code?
1)To hide the button when view load.
2)To display button when keypad opens.
Thanks
judy