- UISearchBar:在searchBarSearchButtonClicked:代理方法写入实现代码即可
-(void)searchBarSearchButtonClicked:(UISearchBar *)searchBar
{
NSLog(@"点击了搜索商品输入框,跳转到商品列表");
}
- UITextField:在textFieldShouldReturn:代理方法写入实现代码即可
- (BOOL)textFieldShouldReturn:(UITextField *)textField
{
NSLog(@"输入完成收起键盘");
return YES;
}
网友评论