ios - 有没有办法使用 RubyMotion 在 UITableViewController 中重新加载数据?

标签 ios iphone ios7 uitableview rubymotion

我有一个 UITableViewController 但我在它上面展示了一个模态 Controller 。当模态 Controller 关闭时,我再次看到 UITableViewController。此时我想重新加载UITableViewController

中的数据

示例场景

  1. UITableViewController 红蓝绿
  2. 向模态 Controller 展示其中的文本字段。在文本字段中键入黄色,然后单击一个按钮。单击按钮时,模态 Controller 被关闭,UITableViewController 重新出现
  3. 重新加载 UITableViewController 以显示红蓝绿黄

这可能吗?

最佳答案

那应该 super 简单:

// assuming this is somewhere in your UITableViewController implementation:
[self.tableView reloadData];

我假设如果下面的链接是准确的,则 RubyMotion API 中存在完全相同的方法名称:

http://www.rubymotion.com/developer-center/api/UITableView.html#reloadData-instance_method

额外的 S.O.已经有一个非常相似的帖子,用于仅重新加载 TableView 的某些部分:

RubyMotion reload sections of UITableView

关于ios - 有没有办法使用 RubyMotion 在 UITableViewController 中重新加载数据?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22520630/

相关文章:

ios - Swift 4.0 - 无法在 iOS 中创建空文本文件

iphone - 关于运送 iphone 应用程序的安全问题

iphone - 为 AVAssetExportSession 创建一个时间范围

ios - iOS7 中 MFMailComposeViewController 的 View 大小损坏

c# - iOS 7 不断在空字典上发送 IDLE 命令

iphone - 如何让付费版和免费版的 iOS 应用共享 FB App ID?

ios - 在 UITextField 中插入文本后不需要的 UIView 框架重置

ios - 在表格 View 中选择多个对象

iphone - NSMutableArray 和内存管理

ios - 当用户打开定位服务时收到通知 iOS 7 及更高版本