至于构建 GUI 应用程序,我建议使用 Cocoa (Objective-C) 构建 GUI 部分。您仍然可以使用 C++ 实现您的逻辑和应用程序的其余部分(C++ 和 Objective-C 一起工作)。然而,Cocoa 比旧的基于 C++ 的 Carbon 更容易使用。我认为 Carbon 是一种遗产。当苹果推出 10.6 时,许多幕后的东西正在将其代码库从 Carbon 转换为 Cocoa(例如 Finder 等)。
My recommendation is to work your way through the docs at http://developer.apple.com . There is a ton of useful material there from guides to sample code.
As for building GUI apps, I would recommend building the GUI parts with Cocoa (Objective-C). You can still implement your logic and rest of the app with C++ (C++ and Objective-C work together). However, Cocoa is MUCH easier to work with than the older C++ based Carbon. I would consider Carbon to be legacy. When apple put out 10.6, a lot of the under-the-hood stuff was transitioning their codebase from Carbon to Cocoa (like the Finder, etc).
C++ 是必需的吗?大多数 Mac 的 GUI 编程都是使用 Objective-C 或 C 完成的。选择的书是 Aaron Hillegas 的 Mac OS X 的 Cocoa 编程。这是一本出色的书,会让你立即投入其中。
Is C++ a requirement? Most of GUI programming for Mac is done with Objective-C or C. The book of choice is Aaron Hillegas' Cocoa Programming for Mac OS X. It's an outstanding book that will let you jump in right away.
发布评论
评论(3)
我的建议是阅读 http://developer.apple.com 上的文档。其中有大量有用的材料,从指南到示例代码。
至于构建 GUI 应用程序,我建议使用 Cocoa (Objective-C) 构建 GUI 部分。您仍然可以使用 C++ 实现您的逻辑和应用程序的其余部分(C++ 和 Objective-C 一起工作)。然而,Cocoa 比旧的基于 C++ 的 Carbon 更容易使用。我认为 Carbon 是一种遗产。当苹果推出 10.6 时,许多幕后的东西正在将其代码库从 Carbon 转换为 Cocoa(例如 Finder 等)。
My recommendation is to work your way through the docs at http://developer.apple.com . There is a ton of useful material there from guides to sample code.
As for building GUI apps, I would recommend building the GUI parts with Cocoa (Objective-C). You can still implement your logic and rest of the app with C++ (C++ and Objective-C work together). However, Cocoa is MUCH easier to work with than the older C++ based Carbon. I would consider Carbon to be legacy. When apple put out 10.6, a lot of the under-the-hood stuff was transitioning their codebase from Carbon to Cocoa (like the Finder, etc).
C++ 是必需的吗?大多数 Mac 的 GUI 编程都是使用 Objective-C 或 C 完成的。选择的书是 Aaron Hillegas 的 Mac OS X 的 Cocoa 编程。这是一本出色的书,会让你立即投入其中。
Is C++ a requirement? Most of GUI programming for Mac is done with Objective-C or C. The book of choice is Aaron Hillegas' Cocoa Programming for Mac OS X. It's an outstanding book that will let you jump in right away.
我的书签中有一些链接,它们是:
两者都包含大量非常有用的资源链接,cocoadev.com 还有一组您可以遵循的教程。
There are a few links I have in my bookmarks, here they are:
Both contain a fair amount of links to resources that can be very helpful, cocoadev.com has also a set of tutorials you could follow.