ios 6 - 数据加载后立即触发

标签 ios ios6 uitableview afnetworking segue

我在 TableView 中有一些数据。我想要的是在用户点击行后立即调用服务。 主要问题是“performToSegue”首先被调用,因此没有数据可以填充到目标 Controller 的 tableView 中。

如何在检索数据后立即调用 segue?

非常感谢您的建议!

最佳答案

  • 您需要删除 Storyboard 中从单元格拖动到下一个 viewController 的 Segue。
  • 接下来通过从当前 Controller 拖动到下一个 Controller 来进行转场

enter image description here

现在在 UITableViewController 中实现

    - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
    {
      // Do some network request
      // on completion call
      [self performSegueWithIdentifier:@"theIdentifierUsedInStoryboard" sender:self];
    }

关于ios 6 - 数据加载后立即触发,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15844687/

相关文章:

ios - swift : Subclassing SlackTextViewController in tableview

ios - 根据 UITableViewCell iOS 中的内容调整 UILabel 的大小

ios - 选择一个 UITableViewCell 在滚动后选择另一个单元格

iOS 推送通知横幅未出现

ios - 在 iOS 上使用 Grand Central Dispatch,如果常规 Objective-C block 不在调度队列中,它们会在哪个队列(如果有)上运行?

ios - 在 SQLite iPhone 中加入查询

ios - UITableView 的自定义页脚 View 不完全可见

iphone - 供应商标识符

ios - AirPlay 菜单在 iOS 6 上以纵向显示不正确

swift - 当表不可见时防止/推迟从 NSFetchedResultsController 更新 TableView