从一个UIViewController
我拨打另一个UIViewController
FullScreenViewController *anotherViewController = [[FullScreenViewController alloc] initWithNibName:@"FullScreenViewController" bundle:nil];
UIView *theWindow = [currentView superview];
[theWindow addSubview:newView];
在打开的FullScreenViewController
上,我想在父UIButton
内调用UIViewController
来调用方法。
有办法吗?我该怎么办?
由于
答案 0 :(得分:0)
您可以在构建期间(通过在父级中传入self)将未获取的引用传递给子视图控制器,孩子可以使用它来调用其父级的方法。
更好的是,你可以让父母成为孩子的代表: How do I create delegates in Objective-C?