相关疑难解决方法(0)

按返回键如何在swift中隐藏键盘?

UITextfied在点击文本键盘时使用,但是当我按下return键时,键盘没有消失.我使用了以下代码:

func textFieldShouldReturn(textField: UITextField!) -> Bool // called when 'return' key pressed. return NO to ignore.
{
    return true;
}
Run Code Online (Sandbox Code Playgroud)

resignfirstresponder方法没有进入功能.

uitextfield ios swift

195
推荐指数
15
解决办法
21万
查看次数

标签 统计

ios ×1

swift ×1

uitextfield ×1