Objective-C和Cocoa之间有什么区别? [英] What's the difference between Objective-C and Cocoa?

查看:126
本文介绍了Objective-C和Cocoa之间有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只是在Mac上学习Objective-C / Cocoa编程。所有的教程,书籍,博客,播客等。我一直在使用真的覆盖两个在一起。是否有一个简单的方法来分辨哪些是vanilla Objective-C和哪些来自Cocoa?

I'm just learning Objective-C/Cocoa programming for the Mac. All of the tutorials, books, blogs, podcasts, etc. I've been using really cover the two together. Is there an easy way to tell which pieces are vanilla Objective-C and which come from Cocoa?

推荐答案

Objective-C是语言...它定义了所有的东西,比如用于定义对象的关键字,消息对象的语法等。

Objective-C is the language... it defines all the things like the keywords for defining objects, the syntax for messaging object, things like that.

Cocoa是一个开发框架伞框架,它结合了三个其他框架,Foundation,AppKit和CoreData)。

Cocoa is a development framework (it's actually an umbrella framework which combines three other frameworks, Foundation, AppKit and CoreData).

这些框架(Cocoa)定义所有对象,使用和与操作系统,以及一些功能。例如,Cocoa定义了 NSString NSObject 。 Cocoa目前可以与其他语言绑定(例如python或ruby)一起使用,并且也用于Java。所以,如果你使用Cocoa与Java,你仍然会得到一个 NSString 对象,但你会从Java应用程序中调用和使用它。

These frameworks (Cocoa) define all the objects that are nice to use and interact with the operating system, as well as a number of functions. For example, Cocoa defines things like NSString and NSObject. Cocoa can currently be used with other language bindings, such as python or ruby, and used to be used with Java as well. So, if you were using Cocoa with Java, you would still get an NSString object, but you would call and use it from within a Java application.

没有链接到一个Cocoa框架,Objective-C只有一个非常基本的Object类作为一个预定义的根类。

Without linking to one of the Cocoa frameworks, Objective-C comes with only a very basic Object class as a pre-defined root class.

这篇关于Objective-C和Cocoa之间有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆