0

I followed the same procedure from Apple Documentation but i am facing some problem with dismissing the keyboard .

The code :

- (BOOL) textFieldShouldReturn:  (UITextField *) theTextField
 {

    if(theTextField == self.textField)
    {

       [theTextField resignFirstResponder];
    }
    return YES;
}

I know this question has been asked many times here , but i could not find an appropriate answer or an solution for this , so only i am posting this question.

4

1 回答 1

1

确保您的文本字段的委托设置为情节提要中的视图控制器。可以这样做:

为您的文本字段设置委托

于 2013-07-24T18:45:25.600 回答