views:

86

answers:

2

Hi,

I have a table view on a view and table view contains custom cells and cell contains text box. and i want to hide the keyboard when user click on save button or user navigate from the view. i already have hide the keyboard on done button.. plz can any one suggest.

A: 

All you have to do is to resign your text box from being the firstResponder :

[textbox resignFirstResponder];

Put that in the method called when you click on save and you'll be good to go

TheSquad
A: 

Use the following code

- (void)viewWillDisappear:(BOOL)animated 
{
    [textField resignFirstResponder];

}

It will dismiss your keyboard when ever your view is dismissed.

If on clicking save button your view is not getting dismissed then on SAVE button Click event also you have to write [textField resignFirstResponder]; else it will work.

hAPPY cODING...

Suriya