I am using UITextfied
while clicking on textfied keyboard appear but when i pressed the return key, keyboard is not disappearing. I used the following code:
func textFieldShouldReturn(textField: UITextField!) -> Bool // called when 'return' key pressed. return NO to ignore.
{
return true;
}
the method resignfirstresponder is not getting in function.
Best Answer
You can make the app dismiss the keyboard using the following function
Here is a full example to better illustrate that:
Code source: http://www.snip2code.com/Snippet/85930/swift-delegate-sample