gpt4 book ai didi

swift - Swift 中每个 NSTabViewItem 一个 View Controller

转载 作者:行者123 更新时间:2023-11-28 08:12:11 24 4
gpt4 key购买 nike

我正在快速为 mac OSX 编写一个应用程序,我想清楚地分离代码,所以我正在寻找一种方法,让 NSTabView 中的每个 NSTabViewItem 都有一个 View Controller ,而无需使用选项卡 View Controller 。是否可以 ?

最佳答案

最后,我找到了解决办法。使用“容器 View ”可以做到这一点。我在 View 中放置了一个容器 View 。我创建了一个新的 View Controller 。最后,我用 Ctrl-Drag 从容器 View 链接到新的 View Controller 并选择“嵌入”。更多信息在此 tutorial

关于swift - Swift 中每个 NSTabViewItem 一个 View Controller ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43392962/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com