IOS UITextField 跳转到搜索界面
2015-08-24 20:47
441 查看
利用下面的代码,当UITextField 输入框中焦点停留时,立刻跳转到搜索页面中,进行搜索处理。
- (BOOL)textFieldShouldBeginEditing:(UITextField *)textField
{
if (textField ==
_searchTextField)
{
SearchViewController *_followSearchViewController = [[SearchViewController
alloc]init];
[self.navigationController
pushViewController:_followSearchViewController
animated:YES];
}
return
YES;
}
- (void)textFieldDidBeginEditing:(UITextField *)textField
{
[self
resignTextResponder];
}
- (BOOL)textFieldShouldBeginEditing:(UITextField *)textField
{
if (textField ==
_searchTextField)
{
SearchViewController *_followSearchViewController = [[SearchViewController
alloc]init];
[self.navigationController
pushViewController:_followSearchViewController
animated:YES];
}
return
YES;
}
- (void)textFieldDidBeginEditing:(UITextField *)textField
{
[self
resignTextResponder];
}
相关文章推荐
- Android UI之自定义AutoCompleteTextView
- StringBuffer和StringBuilder
- Android UI之自定义SeekBar
- UI -响应者链
- Easyui-Datagrid—表头灵活显示
- Design Pattern_Java:Builder Pattern
- UIView常用的方法
- Android UI设计:ListView适配器——ArrayAdapter、SimpleAdapter与BaseAdapter
- Go web之旅(Request分析)
- UIKeyboard
- Android UI设计——RadioButton和CheckBox控件
- STL Algorithms 之 unique
- Android UI之QuickContactBasge
- UItableView中的一些方法
- IOS-笔记14(UITextField,UITableView)
- HDU 5400(Arithmetic Sequence-暴力找区间)
- UIScrollView添加控件,控件距离顶部始终有间距的问题
- 5 Techniques To Understand Machine Learning Algorithms Without the Background in Mathematics
- IOS第12天(3,UIViewController的生命周期)
- IOS UITextView自适应高度