Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/macos/8.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
Macos PerformsgueWithIdentifier在OS X中打开一个新窗口_Macos_Storyboard - Fatal编程技术网

Macos PerformsgueWithIdentifier在OS X中打开一个新窗口

Macos PerformsgueWithIdentifier在OS X中打开一个新窗口,macos,storyboard,Macos,Storyboard,我正在使用故事板开发OSX应用程序 我有两个视图控制器LaunchViewController和MainViewController。WindowController已将LaunchViewController作为窗口内容。LaunchViewController执行一些检查,然后转到MainViewController。我希望在第一个窗口中显示MainViewController,但我看到两个窗口,一个显示LaunchViewController,另一个使用MainViewController

我正在使用故事板开发OSX应用程序

我有两个视图控制器LaunchViewController和MainViewController。WindowController已将LaunchViewController作为窗口内容。LaunchViewController执行一些检查,然后转到MainViewController。我希望在第一个窗口中显示MainViewController,但我看到两个窗口,一个显示LaunchViewController,另一个使用MainViewController

[self-PerformsgueWithIdentifier:kSegueToContentView发件人:self]


这是预期的行为吗?我应该使用ContainerView而不是调用performSegue吗?

我建议使用自定义segue,以避免在新窗口中打开新的视图控制器

我可以帮你