0

我有一个视图控制器和 5 个视图。目前我在 mainMenu.xib 中使用弹出窗口来访问 NSObject AppController,它使用视图控制器在视图之间进行更改。

我知道在 IOS 中使用情节提要,您可以使用视图中的按钮在视图之间进行切换。这在 OSX 中可能吗?

我可以在 FirstViewController.xib 中放置一个按钮来访问我的 AppController 对象中的 changeViewController 吗?

谢谢

4

2 回答 2

0

In OSX your views will appear in a NSWindow. So what you need to do is, upon pressing that button (which fires a IBAction), tell your window (or subclassed NSWindow or NSWindowController) that you want to switch views.

(which you can do via removeSubview or addSubview to the NSWindow's contentView)

You don't have segues or storyboards in MacOS applications, b.t.w.

于 2013-09-17T04:20:18.043 回答
0

在 2014 年的 WWDC 上,他们推出了 适用于 MacOS X 的 Storyboard。因此,IOS 开发人员可以更加轻松地为 Mac 创建 UI。

于 2015-06-22T16:55:28.357 回答