Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在登录页面中,有两个文本输入(text1 和 text2)用于输入用户名和密码。resignFirstResponder单击登录后,它会在这两个文本框中调用两个。我想知道为什么需要调用这个方法?
resignFirstResponder
我不知道你在说什么,但是 resignFirstResponder 会导致当前具有焦点的文本框释放焦点并且键盘将隐藏。