2011-04-27 37 views

回答

1

從tableview發佈一個NSNotification並添加UIViewController作爲觀察者。

+0

認爲這是最簡單的方法。 – madmax 2011-04-27 21:37:15

1

過帳NSNotification將工作做好......你還可以創建一個在您的UITableViewController類的回調對象和選擇。

,你可以用一個回調對象,回調選擇

initWithTarget:(id)theTarget andSelector:(SEL) theSelector 

初始化的UITableViewController ...的值保存關閉到您的tableView屬性

從didSelectRowAtIndexPath方法

然後......調用

[self.target performSelector:self.selector]; 

使用此方法,您可以根據需要定義自己的回調方法..從創建彈出窗口的ViewController類中,你可以做這樣的事情...

[[MyTableView alloc] initWithTarget:(self) andSelector:@selector(popoverControllerDidRequestClose)]; 
相關問題