gpt4 book ai didi

macos - Cocoa文档应用程序,什么是App Controller?

转载 作者:行者123 更新时间:2023-12-03 17:21:28 25 4
gpt4 key购买 nike

我试图了解基于文档的应用程序中的“应用程序 Controller ”是什么。苹果没有提及here 。在我正在阅读的书中(Mac OS X 的 Cocoa 编程第四版),作者创建了一个应用程序 Controller 来处理充当首选项窗口的 NSWindowController 子类。应用程序 Controller 是 NSObject 的直接子类,因此看起来这不是某个标准的 Cocoa 类。

这就是应用程序 Controller 的作用吗?在基于文档的应用程序中处理共享窗口?它还有其他作用吗?

最佳答案

[The AppController] is responsible for setting up all of the initial view controllers, the window and serving as the handler for OS<->Application messages.

这取自类似问题的答案 here .

关于macos - Cocoa文档应用程序,什么是App Controller?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25397278/

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