Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/103.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios 从情节提要ViewController调用函数?_Ios_Ios4_Storyboard - Fatal编程技术网

Ios 从情节提要ViewController调用函数?

Ios 从情节提要ViewController调用函数?,ios,ios4,storyboard,Ios,Ios4,Storyboard,我将项目设置为故事板 有一个子视图,我已经打开了该视图,我想访问storyboardUIViewController的函数来触发事件 这样的东西可以访问吗?根据我的经验,如果你不通过故事板触发转换,你通常最好使用老式的方式 UIViewController* newVC = [self.storyboard instantiateViewControllerWithIdentifier:@"MyViewController"]; // do whatever setup you want her

我将项目设置为故事板

有一个子视图,我已经打开了该视图,我想访问storyboard
UIViewController的
函数来触发事件


这样的东西可以访问吗?

根据我的经验,如果你不通过故事板触发转换,你通常最好使用老式的方式

UIViewController* newVC = [self.storyboard instantiateViewControllerWithIdentifier:@"MyViewController"];
// do whatever setup you want here


[self.navigationController pushViewController:newVC];

当你正在做的事情符合故事板的方法时,这是很好的,但它不会给你任何你不能用手做的事情,而且一旦你开始在风投之间传递任何复杂的东西,不必实现iActions所节省的优势很快就被编写复杂的prepareForSeque等所抵消。

您能更详细地说明您想要实现什么吗?包含一些代码也很有用:-)