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.
我有一个搜索栏,点击搜索栏会弹出键盘。按下搜索键盘上的搜索按钮时,键盘应隐藏。这个怎么做 ?
基本上你只需要调用 resignFirstResponder 方法
-(IBAction)ButtonClick { [txtview resignFirstResponder]; }
StackOverFlow 上有这个问题的几个答案。只是搜索。