iphone - 在不重新加载的情况下更新 UITableView 中的部分页脚标题

标签 iphone ios uitableview

我希望能够在通过键盘键入文本时以编程方式更新 TableView 中某个部分的页脚标题。当我单击一个单元格以使其 detailedText View 可编辑时出现键盘,因此我想更新页脚标题而不从数据源重新加载。

事实上,如果我这样做,键盘就会消失,所以这不是一种好的交互方式。我一直没能找到解决这个问题的好办法……有什么建议吗?

谢谢

最佳答案

我知道我来晚了,但我发现你可以简单地这样做:

[self.tableView beginUpdates];
[self.tableView footerViewForSection:section].textLabel.text = @"Whatever";
[[self.tableView footerViewForSection:section].textLabel sizeToFit];
[self.tableView endUpdates];

关于iphone - 在不重新加载的情况下更新 UITableView 中的部分页脚标题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5929675/

相关文章:

ios - Xcode UIPageViewController - 如何控制过渡期间的行为?

swift - 如何正确更新 TabBarItem 的徽章值?

ios - 使用 exit-segue 时的 viewWillAppear 和 viewDidAppear

ios - 如何根据屏幕尺寸设置 UITableViewCell 高度

iphone - 使用 REGEX 解析 html NSString

iphone - iPhone应用程序的applicationWillResignActive : method run on incoming call if the phone is already in standby mode?

objective-c - 如何同时获取多个目标的 IPA(Xcode 7.0 GM)?

iphone - 在后台和 Nstimer 中工作时出现问题?

ios - 使 UICollectionViewCell 完全适合可用空间

objective-c - 后台线程和主线程同时访问核心数据时应用程序崩溃