[APRESS] Beginning Objective (James Dovey).pdf
(
6730 KB
)
Pobierz
For your convenience Apress has placed some of the front
matter material after the index. Please use the Bookmarks
and Contents at a Glance links to access them.
Contents at a Glance
About the Authors�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½
xv
About the Technical Reviewer �½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½
xvii
Acknowledgments �½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½
xix
■
Chapter 1: Getting Started with Objective-C�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½
1
■
Chapter 2: Object-Oriented Programming �½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½
23
■
Chapter 3: Foundational APIs �½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½
43
■
Chapter 4: Objective-C Language Features �½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½
75
■
Chapter 5: Using the Filesystem �½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½
107
■
Chapter 6: Networking: Connections, Data, and the Cloud �½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½
159
■
Chapter 7: User Interfaces: The Application Kit �½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½
189
■
Chapter 8: Data Management with Core Data �½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½
225
■
Chapter 9: Writing an Application �½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½269
■
Chapter 10: Après Code: Distributing Your Application �½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½353
Index �½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½�½
371
v
Chapter
1
Getting Started
with Objective-C
The Objective-C programming language has a long history, and while it has languished in the
fringes as a niche language for much of that time, the introduction of the iPhone has catapulted
it to fame (or infamy): in January 2012, Objective-C was announced as the winner of the TIOBE
Programming Language Award for 2011. This award goes to the language that sees the greatest
increase in usage over the previous twelve months; in the case of Objective-C, it leaped from
eighth place to fifth on the index during 2011. You can see its sudden, sharp climb in Figure
1-1.
The Objective-C programming language was created in the early 1980s by Brad Cox and Tom
Love at their company StepStone. It was designed to bring the object-oriented programming
approach of the Smalltalk language (created at Xerox PARC in the 1970s) to the existing world
of software systems implemented using the C programming language. In 1988, Steve Jobs (yes,
that Steve Jobs) licensed the Objective-C language and runtime from StepStone for use in the
NeXT operating system. NeXT also implemented Objective-C compiler support in GCC, and
developed the FoundationKit and ApplicationKit frameworks, which formed the underpinnings of
the NeXTstep operating system’s programming environment. While NeXT computers didn’t take
the world by storm, the development environment it built using Objective-C was widely lauded
in the software industry; the OS eventually developed into the OpenStep standard, used by both
NeXT and Sun Microsystems in the mid-1990s.
In 1997, Apple, in search of a solid base for a new next-generation operating system, purchased
NeXT. The NeXTstep OS was then used as the basis for Mac OS X, which saw its first
commercial release in early 2001; while libraries for compatibility with the old Mac OS line of
systems were included, AppKit and Foundation (by then known by the marketing name Cocoa)
formed the core of the new programming environment on OS X. NeXT’s programming tools,
Project Builder and Interface Builder, were included for free with every copy of Mac OS X, but
it was with the release of the iPhone SDK in 2008 that Objective-C began to really take off as
programmers rushed to write software for this exciting new device.
1
2
CHAPTER 1: Getting Started with Objective-C
TIOBE Programming Community Index Objective-C
8.5
8.0
7.5
7.0
6.5
6.0
5.5
5.0
4.5
4.0
3.5
3.0
2.5
2.0
1.5
1.0
0.5
0.0
2002
2003
2004
2005
2006
2007
Time
2008
2009
2010
2011
2012
Figure 1-1.
TPCI Objective-C Usage Trend, January 2002 – January 2012
In this chapter you will learn how to use the Xcode programming environment to create a simple
Mac application, including work on the UI and user interaction. After that you’ll look at some of
the details of the Objective-C language itself: the keywords, structure, and format of Objective-C
programs, and the capabilities provided by the language itself.
Xcode
Programming for the Mac and iPhone is done primarily using Apple’s free toolset, which chiefly
revolves around the Xcode integrated development environment (IDE). Historically, Xcode
shipped with all copies of OS X on disc or was available for download via the Apple Developer
Connection web site. In these days of the App Store, however, Xcode is primarily obtained
through it. Fire up the App Store application on your Mac, type “Xcode” into the search field, and
hit Enter. You’ll find yourself presented with the item you see in Figure
1-2.
Normalized fraction of total hits (%)
Plik z chomika:
Ryjufka
Inne pliki z tego folderu:
[SAMS] Cocoa Programming (Scott Anguish) (2002).pdf
(9155 KB)
Advanced Graphics Programming Using OpenGL (Tom McReynolds, David Blythe).pdf
(13052 KB)
Absolute FreeBSD (Michael W. Lucas).pdf
(7836 KB)
Beginning iOS Game Development (Patrick Alessi).pdf
(20539 KB)
Begining iPad Development for iPhone Developers (Jack Nutting).pdf
(6606 KB)
Inne foldery tego chomika:
[Eng] Android books
BPM Business Process Modeling
IT Ebooks Mega Pack
IT Ebooks Programming
IT epub
Zgłoś jeśli
naruszono regulamin