可以說我有兩個視圖控制器,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