Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

iphonejudy

macrumors 6502
Original poster
Sep 12, 2008
301
1
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)textFieldShouldReturn:(UITextField *)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
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.