可以说我有两个视图控制器,firstViewController和secondViewController。 firstViewController应该呈现secondViewController,我也想通过firstViewController从secondViewController访问一堆方法和属性。iphone sdk:如何连接两个UIViewController?
我这样做只需使用firstViewController的头文件中的导入标记,我只需将secondViewController导入firstViewController。
但现在我也希望它的工作相反。我想通过secondViewController从firstViewController访问一些方法或其他东西。当我还将firstViewController导入到secondViewController时,由于某种原因它不起作用。
这是为什么?有没有人知道解决这个问题?提前致谢!
你问关于编译问题(头包括等),或关于面向对象的委派? – Santa 2010-08-23 09:40:16
面向对象的代表团! – 2010-08-23 10:14:45