views:

395

answers:

2

Hi,

In my application I have textfield and while inserting any values in it it is displaying according values to the tableview as the no. of rows.

I want that when I scroll on the Tableview with having so many filled rows ,the keyboard must be hidden at the time of scrolling.

I have search on the net,but unable to find out the solution.

please give any solution with code snippet or valuable link or any solution.

Thanks, Mishal Shah

A: 

Generally, [myTextField resignFirstResponder] puts the keyboard modal view away. Depending on how you have set up handling scrolling, this should be enough to answer your question.

Alex Reynolds
+3  A: 

In your table controller, add this:

- (void)scrollViewWillBeginDragging:(UIScrollView *)scrollView {
    [myTextField resignFirstResponder];
}
Zoran Simic