2011-08-08 53 views
0

Execute方法從一個UIViewController我叫另一UIViewController對父母的UIViewController

FullScreenViewController *anotherViewController = [[FullScreenViewController alloc] initWithNibName:@"FullScreenViewController" bundle:nil]; 

UIView *theWindow = [currentView superview]; 

[theWindow addSubview:newView]; 

在打開的FullScreenViewController,我想提出一個UIButton調用父UIViewController內的方法。

有辦法做到這一點?我應該如何繼續?

感謝

回答

0

你可以通過一個不保留引用其施工期間的子視圖控制器(通過傳遞自父),這樣子可以用它來調用方法上它的父。

更妙的是你可以讓家長孩子的委託: How do I create delegates in Objective-C?