ios - 表重新加载无法从 textFieldShouldEndEditing 委托(delegate)方法工作

标签 ios xcode uitableview delegates uitextfield

我正在使用自定义单元格,我的客户中有一个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/

相关文章:

iphone - 从字符串中获取 NSDate

ios - 如何将视差效果应用于包含水平 UICollectionView 的 UITableView header ?

ios - 使用 json 填充的单元格准备segue

ios - UITextView 顶部留有空间

iphone - 应用程序作为调试运行,但在发布时崩溃

Xcode 8 扩展已禁用

xcode - 从 UITableViewCell 调用 View Controller 中的函数

android - ( flutter )如何在类里面争吵?

ios - 自定义 'Copy' 文本弹出窗口(UIWebView)?

ios - 图表数据的核心数据模型设计