其实点击cell关闭键盘只要一句话- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { [tableVi ...
其实点击cell关闭键盘只要一句话
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
监听里面的textfeild内容改变其实就是当textfeild内容改变的时候将赋值给他的数组的数据改变下就行了,用tag标示不同的textfeild
newcell.textfeild.delegate = self;
在UITextFieldDelegate代理方法中通过tag改变相应的数据
- (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string {
加载不同的cell就是给他注册不同的cell,取的时候也那样取就行了
注册:
[_tableveiw registerClass:[CustomCell class] forCellReuseIdentifier:@"cellID"];
加载:
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
demo链接:https://github.com/WuJiForFantasy/UITableViewCell.git
原标题:UITableView延伸:点击cell关闭键盘,加载不同cell,监听里面的textfeild内容改变
关键词:ie
*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们:
admin#shaoqun.com
(#换成@)。