我正在使用自定义单元格,我的客户中有一个textField 单元格。
当我完成编辑textfeild时,它是委托(delegate)方法 textFieldShouldEndEditing 被调用并正在重新加载表格 存在于另一个类中的 View 。问题是 TableView 委托(delegate) 不工作(表格 View 重新加载)。
**//Custom cell class textfield delegate method**
- (BOOL)textFieldShouldEndEditing:(UITextField *)textField{
**//tableReload is existing class table view reload method**
[rptCartdelegate tableReload];
return YES;
}
//另一个类方法
-(void)tableReload{
//here table is not nill have object information and passing array also not empty
[tableview reload];
}
我想我已经解释了我的问题.. 如果您有任何想法,请分享您的想法......我希望你的想法会 帮我.. 谢谢。
最佳答案
只需将方法 textFieldShouldEndEditing: 更改为 textFieldDidEndEditing:
关于ios - 表重新加载无法从 textFieldShouldEndEditing 委托(delegate)方法工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17229300/