使键盘上的返回按钮执行操作
答
有当搜索按钮被按下
- (void)searchBarSearchButtonClicked:(UISearchBar *)searchBar
{
//CALL YOUR IBACTION METHOD HERE
}
-Happy编码其烧成一个委托方法
答
(BOOL)textFieldShouldReturn:(UITextField *)textField{
[self yourButtonName:nil];
}