We don’t allow questions seeking recommendations for software libraries, tutorials, tools, books, or other off-site resources. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(3)
我的建议:
避免碳——这是一项传统技术。您将无法获得对操作系统的现代版本或 64 位目标的良好支持 - 一旦您想要支持最新版本,您将需要重写一堆代码。
首先,熟悉 Cocoa API。 Cocoa 接口(例如 AppKit)是用 Objective-C 编写的。如果您想使用 C++,您至少需要熟悉 Cocoa(除非您完全绕过 Cocoa 并直接使用 OpenGL)。有很多 Cocoa 示例代码和几本书。
一旦您掌握了 Cocoa 并准备好使用 C++,请研究 OpenGL、CoreGraphics 和 CoreText 等库。您可以访问所有这些技术并在 Cocoa 中使用它们。
有点迂回的方法,但它对于现代的本地 OSX UI 或多或少是必要的。许多 OSX 开发人员甚至没有超越 Cocoa。
最后,你可以将 ObjC 与 C++ 混合,称为 Objective-C++。
My advice:
Avoid Carbon -- it is a legacy technology. You will not get good support for modern releases of the OS, or for 64 bit targets -- and then you'll have a bunch of code to rewrite once you want to support recent releases.
First, get comfortable with Cocoa APIs. Cocoa interfaces (e.g. AppKit) are written in Objective-C. If you want to use C++, you'll need to at least be familiar with Cocoa (unless you bypass Cocoa entirely and go straight to OpenGL). There is a lot of Cocoa sample code, and several books.
Once you have a grasp on Cocoa and you are ready to use your C++, look into libraries like OpenGL, CoreGraphics, and CoreText. You can access all of these technologies and use them in Cocoa.
A bit of a roundabout approach, but it's more or less necessary for modern, native OSX UIs. Many OSX developers don't even go beyond Cocoa.
Lastly, you can mix ObjC with C++, it's called Objective-C++.
碳是相当古老的东西。今天,您使用 Cocoa 进行 Mac OS X 编程,这主要是在 ObjC 中完成的。 Xcode 中有“Interface Builder”用于构建您的界面。大多数 OS X 开发人员使用 Xcode,您可以从 dev.apple.com 下载 Xcode 3,或从 AppStore 下载 Xcode 4。
有一本非常好的学习 ObjectiveC、Cocoa 和 Xcode 的书:Aaron Hillegas 的 Cocoa Planning for Mac OS X。
Carbon is pretty old stuff. Today, you use Cocoa for Mac OS X Programming which is mostly done in ObjC. You have "Interface Builder" in Xcode for building your interfaces. Most OS X developers use Xcode, you can download Xcode 3 from dev.apple.com or Xcode 4 from the AppStore.
There is a pretty good book for learning ObjectiveC, Cocoa and Xcode: Cocoa Programming for Mac OS X by Aaron Hillegas.
首先,您乞求、借用或窃取 Aaron Hillegass 的 《Cocoa 编程》的副本。
To start with, you beg, borrow or steal a copy of "Cocoa Programming" by Aaron Hillegass.