【问题标题】:Referencing a TableViewController property when it is buried on a NavigationController stack当 TableViewController 隐藏在 NavigationController 堆栈中时引用它
【发布时间】:2009-12-15 23:02:06
【问题描述】:

我有一个 UINavigationController,其中有两个 UITableViewController 被推送到它的堆栈上。有没有办法引用第二个下的第一个 TableViewController 上的属性?我想在第二个控制器的 viewWillAppear 方法中执行此操作。

感谢您提供的任何帮助....

【问题讨论】:

    标签: uinavigationcontroller properties uitableview


    【解决方案1】:

    我发现它是......

    [[[[self navigationController] viewControllers] objectAtIndex:0] MyProperty];
    

    index 可以是堆栈上的任何数字...我的恰好是第一个,所以它的索引是 0...

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2023-03-09
      • 1970-01-01
      • 1970-01-01
      • 2014-06-30
      • 1970-01-01
      • 1970-01-01
      • 2013-04-08
      • 1970-01-01
      相关资源
      最近更新 更多