macos 有没有关于 Cocoa 的 Mac GUI 应用程序的好教程?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/3656665/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-21 07:11:59  来源:igfitidea点击:

Are there any good tutorials for Mac GUI Applications with Cocoa?

macoscocoa

提问by AechoLiu

I has read some sample codes from Mac dev, and wrote currencyApplication by self. But I still cannot understand clearly how to implement Mac GUI Applications.

我从Mac dev阅读了一些示例代码,并自己编写了currencyApplication。但是我仍然无法清楚地了解如何实现 Mac GUI 应用程序。

From NSWindowController class reference, I found a Document-Based Applications Overviewpdf for Documents Applications. But I want something like Dialog Programming in MFC.

NSWindowController class reference 中,我找到了Documents ApplicationsDocument-Based Applications Overviewpdf。但我想要像 MFC 中的 Dialog Programming 这样的东西。

Are there any good tutorials for Mac GUI Applications?

有没有关于 Mac GUI 应用程序的好教程?



I found the tutorial from another class reference, NSPanel class reference. The guide is named by Window Programming Guide.

我从另一个类参考NSPanel 类参考中找到了教程。该指南以Window Programming Guide命名。

采纳答案by Chris Devereux

Having learnt Cocoa myself in the last year (and spent some time trawling the internet for tutorials like you're doing), I found there's really no substitute for getting your hands on one good introductionary book. It might cost something, but the time it'll save you will be worth it. Most of what I found online was either far too brief, outdated, or went into too much depth. In general, Apple's tutorials fall into the last category. Better for improving your existing understanding rather than learning it for the first time

去年我自己学习了 Cocoa(并且花了一些时间在互联网上搜索像你正在做的教程),我发现真的没有什么可以替代你的手一本好的介绍书。它可能会花费一些东西,但它为您节省的时间是值得的。我在网上找到的大部分内容要么过于简短、过时,要么过于深入。一般来说,Apple 的教程属于最后一类。更好地提高您现有的理解,而不是第一次学习

Working through a few tutorials structured so that each builds on the last will get you to a stage where you can dive in and understand Apple's docs and the more in-depth tutorials. Instead of learning what everything does in unnecessary detail, you'll get the broad outline that helps the rest make sense.

通过一些结构化的教程,每个教程都以最后一个为基础,您将进入一个阶段,在那里您可以深入了解 Apple 的文档和更深入的教程。您将获得有助于其余部分变得有意义的大纲,而不是在不必要的细节中学习每件事的作用。

I found this one extremely helpful:
http://www.amazon.com/Learn-Cocoa-Mac-Hyman-Nutting/dp/1430218592

我发现这个非常有帮助:http:
//www.amazon.com/Learn-Cocoa-Mac-Hyman-Nutting/dp/1430218592

If you're going to go it alone, it helps to know where to start. I'd suggest learning in roughly this order:

如果你打算一个人去,知道从哪里开始会很有帮助。我建议大致按以下顺序学习:

  1. Basic structure of a cocoa application (what an application delegate is, and the methods you can implement to make stuff happen on load/quit/etc).
  2. Get a feel for how the more simple controls you can add in IB work. Learn about actions and IB Outlets.
  3. Cocoa Bindings. You'll learn a lot of Cocoa's more distinctive concepts, like KVO and KVC in the process of learning this.
  4. If you're interested in ever saving/loading data, or having undo support, Core Data is definitely worth learning.
  1. Cocoa 应用程序的基本结构(什么是应用程序委托,以及您可以实现的方法以在加载/退出/等时使事情发生)。
  2. 感受一下您可以在 IB 中添加的更简单的控件是如何工作的。了解行动和 IB Outlets。
  3. 可可绑定。在学习这个的过程中你会学到很多Cocoa比较有特色的概念,比如KVO和KVC。
  4. 如果您对保存/加载数据或具有撤消支持感兴趣,Core Data 绝对值得学习。

... and then you've probably got enough of a grounding to choose where to go next.

......然后你可能有足够的基础来选择下一步去哪里。

Have fun!

玩得开心!

回答by brainray

This is a good starting point IMHO

恕我直言,这是一个很好的起点

Programming Mac OS X with Cocoa for Beginners

使用 Cocoa 为初学者编程 Mac OS X

回答by Dan

Cococa Dev Centralis quite good for beginner.

Cococa Dev Central非常适合初学者。