Muutke küpsiste eelistusi

Objective-C [Pehme köide]

  • Formaat: Paperback / softback, 400 pages, kõrgus x laius x paksus: 231x190x24 mm, kaal: 822 g, Contains 1 Digital online
  • Sari: Developer Reference
  • Ilmumisaeg: 22-Feb-2011
  • Kirjastus: John Wiley & Sons Ltd
  • ISBN-10: 0470479221
  • ISBN-13: 9780470479223
Teised raamatud teemal:
  • Pehme köide
  • Hind: 46,44 €*
  • * saadame teile pakkumise kasutatud raamatule, mille hind võib erineda kodulehel olevast hinnast
  • See raamat on trükist otsas, kuid me saadame teile pakkumise kasutatud raamatule.
  • Kogus:
  • Lisa ostukorvi
  • Tasuta tarne
  • Lisa soovinimekirja
  • Raamatukogudele
  • Formaat: Paperback / softback, 400 pages, kõrgus x laius x paksus: 231x190x24 mm, kaal: 822 g, Contains 1 Digital online
  • Sari: Developer Reference
  • Ilmumisaeg: 22-Feb-2011
  • Kirjastus: John Wiley & Sons Ltd
  • ISBN-10: 0470479221
  • ISBN-13: 9780470479223
Teised raamatud teemal:
A soup-to-nuts guide on the Objective-C programming language

Objective-C is the language behind Cocoa and Cocoa Touch, which is the Framework of applications written for the Macintosh, iPod touch, iPhone, and iPad platforms. Part of the Developer Reference series covering the hottest Apple topics, this book covers everything from the basics of the C language to advanced aspects of Apple development. You’ll examine Objective-C and high-level subjects of frameworks, threading, networking, and much more.

  • Covers the basics of the C language and then quickly moves onto Objective-C and more advanced topics
  • Draws from the author’s first-hand experience garnered while developing applications for the Mac and iPhone OS platforms
  • Discusses high-level subjects, including Objective-C’s bridges to other languages (C++, Ruby, and more), version control, test-driven development, and user interface design

Featuring real-life examples drawn from the author's experience, Objective-C offers an insider look at this amazing programming language.

Preface viii
Acknowledgments x
Part I: Introducing Objective-C 1(136)
Chapter 1 introducing Objective-C
3(28)
Using Xcode for Development
4(8)
Starting a project
4(3)
Exploring the files in your project
7(1)
Adding source files
8(2)
The main Xcode window
10(2)
Understanding the Compilation Process
12(11)
Writing code
12(3)
Turning source code into compiled code and compiled code into an executable
15(1)
Exploring application bundles
16(2)
Working with build settings
18(5)
Using the Xcode Static Analyzer
23(3)
Understanding the Objective-C Runtime
26(1)
Summary
27(4)
Chapter 2 Understanding Basic Syntax
Working with Statements and Expressions
31(20)
Declaring variables
32(3)
Using comments
35(1)
Exploring scalar types
35(2)
Using special variable modifiers
37(1)
Understanding structures
38(2)
Using typedefs
40(2)
Using enum
42(2)
Understanding pointers
44(4)
Using operators
48(3)
The ternary operator
51(1)
Working with Functions
51(9)
Understanding functions
51(3)
Defining functions
54(2)
Understanding implementation versus interface
56(2)
Linking with implementation files
58(2)
Controlling Program Flow
60(10)
Using conditional statements
61(3)
Using if-else
61(1)
Using the ternary conditional
62(1)
Using switch statements
63(1)
Choosing among conditional statements
64(1)
Working with loops
64(12)
Working with for
65(1)
Traditional for loops
65(1)
Using for fast enumeration
66(1)
Working with while
67(2)
Using do
69(1)
Applying What You Have Learned
70(3)
Summary
73(2)
Chapter 3 Adding Objects
75(34)
Understanding Objects
76(16)
Understanding inheritance
78(2)
Using polymorphism
80(1)
Using the id datatype
81(1)
Creating dasses
81(8)
Working with class files
81(2)
Writing object methods
83(2)
Working with the special object methods
85(2)
Writing dass methods
87(2)
Declaring objects
89(1)
Making calls on objects
90(2)
Working with Properties
92(8)
Understanding the differences between state and behavior
92(7)
Using properties to declare object state
93(3)
Understanding synthesized property accessors
96(1)
Using the nonatomic attribute
97(1)
Using the assign, retain, and copy Attributes
98(1)
Using properties with different data member names
99(1)
Using dot notation
99(1)
Applying Objects
100(9)
Creating the employee class
101(3)
Creating the manager class
104(3)
Tying the classes together in the HR main
107(2)
Chapter 4 Understanding Objective-C Memory Management
109(28)
Using Reference Counting
109(14)
Learning the memory management rules
112(1)
Using autorelease
113(6)
Understanding autorelease pools
117(2)
Understanding memory from inside the object
119(4)
Writing initializers
119(2)
Writing dealloc Methods
121(2)
Using Garbage Collection
123(5)
Understanding the Garbage Collector
123(3)
Understanding reference types
125(1)
Configuring your project for garbage collection
126(2)
Using Frameworks in a Garbage Collected Project
128(1)
Exploring Key Garbage Collector Patterns
128(7)
Managing finite resources
128(3)
Writing foundation applications with garbage collection
131(1)
Working with objects in nib files
132(1)
Forcing garbage collection
133(1)
Working with void pointers and garbage collection
133(1)
Using the object oriented interface to the garbage collector
134(1)
Understanding What Memory Management Model to Use for Your Projects
135(1)
Summary
136(1)
Part II: Exploring Deeper Features 137(120)
Chapter 5 Working with Blocks
Understanding Blocks
139(5)
Declaring code blocks
140(2)
Using code blocks
142(2)
Understanding Important Block Scoping
144(4)
Managing code block memory
145(2)
Making blocks easier to read with typedef
147(1)
Using Blocks with Threads
148(1)
Working with Grand Central Dispatch
148(1)
Using GCD functions to dispatch code blocks in threads
148(1)
Working with Common Block Design Patterns
149(3)
Using code blocks for maps
149(1)
Using Blocks in the Standard API
150(2)
Applying Blocks to an Embarrassingly Parallel Task.
152(10)
Creating the project
152(4)
Using blocks with an array to filter for primes
156(3)
Using Grand Central Dispatch
159(3)
Summary
162(1)
Chapter 6 Using Key Value Coding and Key Value Observing
163(28)
Accessing Object Properties Using Key Value Coding
163(15)
Working with key paths
167(2)
Writing KVC compliant accessors
169(2)
Using KVC with arrays
171(6)
Using indexed accessors
172(2)
Using Unordered Accessors
174(3)
Using KVC with structures and scalars
177(1)
Searching objects for attributes
177(1)
Observing Changes to KC-Compliant Values
178(8)
Using KVO
179(1)
Registering as an observer
179(2)
Defining callbacks for KVO
181(2)
Removing an observer
183(1)
Implementing manual notifications
184(1)
Understanding risks with KVO
185(1)
Applying Key Value Observing
186(3)
Summary
189(2)
Chapter 7 Working with Protocols
191(16)
Favoring Composition Over Inheritance
191(5)
Understanding why you don't need (or want) multiple inheritance
193(1)
Understanding how protocols solve the problem
194(1)
Documenting an expected interface for others to implement
195(1)
Implementing Protocols in Your Objects.
196(8)
Declaring a protocol
197(1)
Dedaring that a dass implements a protocol
198(2)
Declaring an object that must implement a protocol
200(1)
Exploring formal and informal protocols
200(1)
Determining if an object implements optional methods
201(2)
Avoiding Circular Protocol Dependencies
203(1)
Exploring examples of protocol use
204(1)
Summary
205(2)
Chapter 8 Extending Existing Class
207(16)
Working with Third-Party Frameworks and Classes
207(1)
Working with Categories
208(8)
Declaring categories
209(1)
Implementing category methods
210(1)
Declaring categories in header files
211(1)
Using a category
211(1)
Breaking up functionality using categories
212(1)
Extending class methods
212(2)
Exploring category limitations
214(1)
Implementing protocols with categories
215(1)
Understanding the dangers of creating categories on NSObject
215(1)
Extending Classes using Anonymous Categories
216(2)
Associating Variables with Existing Classes
218(3)
Summary
221(2)
Chapter 9 Writing Macros
223(16)
Reviewing the Compilation Process
223(6)
Understanding how macros work
224(5)
Defining Macros
229(8)
Defining constants
230(1)
Passing constants by compilation
231(1)
Using variables in macros
232(2)
Using stringification
234(2)
Handling conditional switching
236(1)
Using built-in macros
237(1)
Summary
237(2)
Chapter 10 Handling Errors
239(18)
Classifying Errors
239(2)
Understanding how to interrupt program flow
240(1)
Using the Different Mechanisms for Error Handling
241(14)
Using return codes
241(3)
Using exceptions
244(6)
Using NSError
250(9)
Creating an NSError Object
251(1)
Understanding the NSError userInfo Dictionary
252(1)
Working with a recovery attempter
253(1)
Working with NSErrors in methods
254(1)
Summary
255(2)
Part III: Using the Foundation Framework 257(54)
Chapter 11 Understanding How the Framework Fit Together
259(6)
Understanding the Foundation Framework
259(3)
Exploring other frameworks
261(1)
Using Frameworks in Your Projects
262(2)
Adding frameworks
262(2)
Including the headers
264(1)
Considering garbage collection
264(1)
Summary
264(1)
Chapter 12 Using Strings
265(8)
Understanding the String Declaration Syntax
265(6)
Using format strings
267(2)
Working with Other NSString Methods
269(2)
Using NSString categories
271(1)
Summary
271(2)
Chapter 13 Working with Collections
273(22)
Working with Arrays
273(10)
Using dictionaries
276(4)
Working with sets
280(1)
Understanding mutability
281(2)
Understanding Collections and Memory Management
283(3)
Using specialized collections
285(1)
Enumerating
286(2)
Sending Messages to Elements
288(1)
Sorting and Filtering
289(3)
Using Blocks with Collections
292(1)
Summary
293(2)
Chapter 14 Using NSValue, NSNumber, and NSData
295(8)
Using NSValue and NSNumber 2%
Wrapping arbitrary datatypes with NSValue
296(1)
Wrapping numbers with NSNumber
297(1)
Doing arithmetic with NSDecimalNumber
298(1)
Using NSData and NSMutableData
299(2)
Creating NSData objects
299(1)
Accessing the raw bytes in an NSData object
300(1)
Summary
301(2)
Chapter 15 Working with Times and Dates
303(8)
Constructing Dates
304(1)
Working with Time Intervals
304(1)
Comparing dates
305(1)
Using NSCalendar
306(1)
Working with time zones
307(1)
Using NSDateFormatter
308(1)
Summary
309(2)
Part IV: Exploring Advanced Topics 311(50)
Chapter 16 Multiprocessing with Threads
313(16)
Synchronizing Code
314(5)
Using Locks
315(2)
Using the @synchronize keyword
317(2)
Understanding atomicity
319(1)
Using NSThread
319(3)
Creating threads
319(1)
Manipulating Running Threads
320(1)
Accessing the main thread
321(1)
Crossing threads using perform selector
322(1)
Using NSOperation and NSOperationQueue
322(6)
Creating operations
323(2)
Adding operations to queues
325(1)
Manipulating queue parameters
326(1)
Using other kinds of operations
326(2)
Summary
328(1)
Chapter 17 Objective-C Design Patterns
329(16)
Recognizing Patterns in Solutions
329(2)
Describing Design Patterns in Objective-C
331(12)
Using Singletons
331(5)
Problem
331(1)
Solution
331(3)
Discussion
334(2)
Delegating responsibility
336(3)
Problem
336(1)
Solution
336(2)
Discussion
338(1)
Notifying objects of changes
339(4)
Problem
339(1)
Solution
339(3)
Discussion
342(1)
Summary
343(2)
Chapter 18 Reading and writing Data with NSCoder
345(10)
Implementing the NSCoding Protocol in Your Objects
345(1)
Encoding objects
345(2)
Encoding basic types
347(1)
Working with object graphs
348(1)
Using other types of data
348(2)
Decoding objects
350(1)
Using NSArchiver and NSUnarchiver
351(1)
Working with Archiver File Formats and Legacy Data
352(1)
Summary
353(2)
Chapter 19 Using Objective-C on Other Platforms
355(6)
Using GNUstep
356(3)
Using Cocotron
357(1)
Using other open source libraries
358(1)
Looking Toward the Future
359(1)
Summary
359(2)
Index 361
Jiva DeVoe is the founder of Random Ideas, LLC, a software company specializing in iPhone and Mac OS X applications. He has been writing software for nearly 25 years. His iPhone apps have been featured as Apple staff picks and in Apple ads. He is also the author of Cocoa Touch for iPhone OS 3 Developer Reference. Contact Jiva through his blog at www.random-ideas.net.