加载中…
个人资料
  • 博客等级:
  • 博客积分:
  • 博客访问:
  • 关注人气:
  • 获赠金笔:0支
  • 赠出金笔:0支
  • 荣誉徽章:
正文 字体大小:

ios  TextField.returnKeyType=UIReturnKeyNext;键盘next下跳

(2014-03-15 14:29:46)
标签:

it

分类: iOS相关

HHtextField为自定义的 textfield 



personalInfoTextField.indexPath = indexPath;


//要实现的Delegate方法,键盘next下跳

- (BOOL)textFieldShouldReturn:(UITextField *)textField {

    if(textField.returnKeyType==UIReturnKeyNext){       //显示下一个

        NSIndexPath *indexPath=((HHTextField *)textField).indexPath;

        NSIndexPath *nextIndexPath=[NSIndexPath indexPathForRow:(indexPath.row+1) inSection:indexPath.section];

        UITableViewCell *cell=[_personDataTableView cellForRowAtIndexPath:nextIndexPath];

        HHTextField *nextTextField=(HHTextField *)[cell viewWithTag:1162];

        [nextTextField becomeFirstResponder];

    }

    return YES;

}

0

阅读 收藏 喜欢 打印举报/Report
  

新浪BLOG意见反馈留言板 欢迎批评指正

新浪简介 | About Sina | 广告服务 | 联系我们 | 招聘信息 | 网站律师 | SINA English | 产品答疑

新浪公司 版权所有