Публикации - Mobile Operating Systems

Apple iOS

The Basics of Objective-C
xCode

Objective-C is the programming language used to develop in both Mac OS X and iOS. It’s
a superset of ANSI C, so it includes the C language as well as other libraries and tools,
much as C++ extends the C language. It’s also an object-oriented language that makes use
of inheritance, polymorphism, and encapsulation—the three pillars of object-oriented
programming.
So why do you need a primer? You might not, but Objective-C looks so much different from the
other languages used in this book that it warrants a short discussion, at least. To begin, Objective-C
uses some different metaphors than most other languages. So, for example, in Objective-C you
send messages to objects rather than call methods on them. Although each Objective-C class
includes an interface in a header file, an Objective-C interface is different from a Java or
C# interface. Objective-C interfaces provide the API for a single class, whereas Java and
C# interfaces can be implemented by many classes. You learned in Chapter 3 that
Objective-C classes are said to conform to protocols rather than implement interfaces
as do Java and C# classes.

 

Количество комментариев: 0

Для того, чтобы оставить коментарий необходимо зарегистрироваться