将 NSTabView 分解为文件
随着我的 Cocoa 应用程序的出现,我的 NSWindowController 正在变得huuuuuuuuuuge。我的窗口有一个 NSTabView,其中的每个选项卡都有自己的 NSViewController (它们都有子菜单)和自己的方法。因此,由于选项卡的存在,我的 WindowController.m 似乎远远超出了应有的范围。
遗憾的是,NSTabView 的示例非常简单。他们不需要任何重组。所以,我在这里寻求建议。如何将选项卡特定的内容从窗口控制器中拉出并放入其自己的专用对象中?
As my Cocoa app comes along, my NSWindowController is becoming huuuuuuuuuuge. My window has an NSTabView, and each tab therein has its own NSViewController (they all have submenus) and its own methods. So, my WindowController.m seems to stretch well beyond what it's supposed to because of tabs.
Sadly, examples of NSTabView are quite simple. They don't need any restructuring. So, here I am seeking advice. How can I pull tab-specific content out of the window controller and into their own dedicated objects?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
请参阅此 Apple 讨论主题中的示例:选项卡控制器?
See the example in this Apple Discussions thread: Tab Controllers?