Muutke küpsiste eelistusi
  • Formaat - EPUB+DRM
  • Hind: 35,63 €*
  • * hind on lõplik, st. muud allahindlused enam ei rakendu
  • Lisa ostukorvi
  • Lisa soovinimekirja
  • See e-raamat on mõeldud ainult isiklikuks kasutamiseks. E-raamatuid ei saa tagastada.
  • Formaat: EPUB+DRM
  • Ilmumisaeg: 12-Sep-2011
  • Kirjastus: Manning Publications
  • Keel: eng
  • ISBN-13: 9781638351665

DRM piirangud

  • Kopeerimine (copy/paste):

    ei ole lubatud

  • Printimine:

    ei ole lubatud

  • Kasutamine:

    Digitaalõiguste kaitse (DRM)
    Kirjastus on väljastanud selle e-raamatu krüpteeritud kujul, mis tähendab, et selle lugemiseks peate installeerima spetsiaalse tarkvara. Samuti peate looma endale  Adobe ID Rohkem infot siin. E-raamatut saab lugeda 1 kasutaja ning alla laadida kuni 6'de seadmesse (kõik autoriseeritud sama Adobe ID-ga).

    Vajalik tarkvara
    Mobiilsetes seadmetes (telefon või tahvelarvuti) lugemiseks peate installeerima selle tasuta rakenduse: PocketBook Reader (iOS / Android)

    PC või Mac seadmes lugemiseks peate installima Adobe Digital Editionsi (Seeon tasuta rakendus spetsiaalselt e-raamatute lugemiseks. Seda ei tohi segamini ajada Adober Reader'iga, mis tõenäoliselt on juba teie arvutisse installeeritud )

    Seda e-raamatut ei saa lugeda Amazon Kindle's. 

HIGHLIGHT

A practical guide to iPhone application development with the

Objective-C programming language.

DESCRIPTION

The iPhone is a sophisticated device, and now that Objective-C is the

one and only language approved by Apple for application

development, mastering it is the key to unlocking its awesome

potential as a mobile computing platform. Objective-C's concise, rich

syntax and feature set, when matched with the iPhone SDK and the

powerful XCode environment, offers developers from any background

a smooth transition into mobile app development for the iPhone.

Objective-C for the iPhone is a hands-on tutorial that leads readers

from their first line of Objective-C code through the process of

building native apps for the iPhone using the latest version of the SDK.

It teaches how to avoid the most common pitfalls, while exploring the

expressive Objective-C language through numerous example projects.

While the book assumes knowledge of an IDE, no previous experience

with Objective-C, the iPhone SDK, or mobile computing is required.

KEY POINTS

F Solid Objective-C foundation specific to iPhone development

F Practical examples

F Tips on best practice
Preface xv
Acknowledgments xvi
About This Book xviii
Author Online xxi
About The Cover Illustration xxii
Part 1 Getting Started With Objective-C 1(94)
1 Building Your First iOS Application
3(25)
1.1 Introducing the iOS development tools
4(1)
Adapting the Cocoa frameworks for mobile devices
4(1)
1.2 Adjusting your expectations
5(2)
A survey of hardware specifications, circa mid-2011
6(1)
Expecting an unreliable internet connection
7(1)
1.3 Using Xcode to develop a simple Coin Toss game
7(8)
Introducing Xcode-Apple's IDE
8(1)
Launching Xcode easily
8(1)
Creating the project
9(3)
Writing the source code
12(3)
1.4 Hooking up the user interface
15(6)
Adding controls to a view
15(2)
Connecting controls to source code
17(4)
1.5 Compiling the Coin Toss game
21(1)
1.6 Taking Coin Toss for a test run
21(6)
Selecting a destination
22(1)
Using breakpoints to inspect the state of a running application
23(1)
Running the Coin Toss game in the iPhone simulator
24(1)
Controlling the debugger
25(2)
1.7 Summary
27(1)
2 Data types, variables, and constants
28(27)
2.1 Introducing the Rental Manager application
29(3)
Laying the foundations
29(3)
2.2 The basic data types
32(8)
Counting on your fingers-integral numbers
32(3)
Filling in the gaps-floating-point numbers
35(2)
Characters and strings
37(2)
Boolean truths
39(1)
2.3 Displaying and converting values
40(4)
NSLog and Format Specifiers
40(3)
Type casts and type conversions
43(1)
2.4 Creating your own data types
44(8)
Enumerations
44(2)
Structures
46(2)
Arrays
48(2)
The importance of descriptive names
50(2)
2.5 Completing Rental Manager v1.0, App Store here we come!
52(2)
2.6 Summary
54(1)
3 An introduction to objects
55(19)
3.1 A whirlwind tour of object-oriented programming concepts
56(2)
What's wrong with procedural-based languages such as C?
56(1)
What are objects?
56(1)
What are classes?
57(1)
Inheritance and polymorphism
57(1)
3.2 The missing data type: id
58(1)
3.3 Pointers and the difference between reference and value types
59(3)
Memory maps
59(1)
Obtaining the address of a variable
59(1)
Following a pointer
60(1)
Comparing the values of pointers
61(1)
3.4 Communicating with objects
62(4)
Sending a message to an object
62(1)
Sending a message to a class
63(1)
Sending nonexistent messages
64(1)
Sending messages to nil
65(1)
3.5 Strings
66(3)
Constructing strings
66(1)
Extracting characters from strings
67(1)
Modifying strings
68(1)
Comparing strings
69(1)
3.6 Sample application
69(3)
3.7 Summary
72(2)
4 Storing data in collections
74(21)
4.1 Arrays
75(7)
Constructing an array
75(1)
Accessing array elements
76(1)
Searching for array elements
77(2)
Iterating through arrays
79(1)
Adding items to an array
80(2)
4.2 Dictionaries
82(6)
Constructing a dictionary
82(2)
Accessing dictionary entries
84(1)
Adding key/value pairs
85(1)
Enumerating all keys and values
86(2)
4.3 Boxing
88(3)
The NSNumber class
89(1)
The NSValue class
90(1)
nil vs. NULL vs. NSNull
90(1)
4.4 Making the Rental Manager application data driven
91(3)
4.5 Summary
94(1)
Part 2 Building Your Own Objects 95(106)
5 Creating classes
97(27)
5.1 Building custom classes
98(1)
Adding a new class to the project
98(1)
5.2 Declaring the interface of a class
99(7)
Instance variables (ivars)
100(1)
Method declarations
101(4)
Fleshing out the header file for the CTRentalProperty class
105(1)
5.3 Providing an implementation for a class
106(3)
Defining method implementations
106(1)
Accessing instance variables
106(1)
Sending messages to self
107(1)
Fleshing out the method file for the CTRentalProperty class
108(1)
5.4 Declared properties
109(6)
@property syntax
109(3)
Synthesizing property getters and setters
112(1)
Dot syntax
113(2)
5.5 Creating and destroying objects
115(5)
Creating and initializing objects
115(1)
init is pretty dumb
116(2)
Combining allocation and initialization
118(1)
Destroying objects
119(1)
5.6 Using the class in the Rental Manager application
120(3)
5.7 Summary
123(1)
6 Extending classes
124(20)
6.1 Subclassing
124(3)
What is subclassing?
125(2)
6.2 Adding new instance variables
127(2)
6.3 Accessing existing instance variables
129(2)
Manual getters and setters approach
130(1)
6.4 Overriding methods
131(3)
Overriding the description method
132(2)
6.5 Class clusters
134(2)
Why use class clusters
134(1)
Multiple public clusters
135(1)
6.6 Categories
136(2)
Extending classes without subclassing
136(1)
Using a category
136(2)
Considerations when using categories
138(1)
6.7 Subclassing in your demo application
138(5)
Creating and subclassing CTLease
139(1)
Creating CTPeriodicLease as a subclass of CTLease
140(1)
Creating CTFixedLease as a subclass of CTLease
141(2)
6.8 Summary
143(1)
7 Protocols
144(19)
7.1 Defining a protocol
145(1)
7.2 Implementing a protocol
146(4)
Creating the protocol method callers
147(1)
Making a class conform to a protocol
148(2)
7.3 Important protocols
150(12)
<UITableViewDataSource>
150(3)
<UITableViewDelegate>
153(4)
<UIActionSheetDelegate>
157(1)
NSXMLParser
158(4)
7.4 Summary
162(1)
8 Dynamic typing and runtime type information
163(14)
8.1 Static vs. dynamic typing
164(2)
Making assumptions about the runtime type
164(2)
8.2 Dynamic binding
166(1)
8.3 How messaging works
166(5)
Methods, selectors, and implementations
167(2)
Handling unknown selectors
169(1)
Sending a message to nil
170(1)
8.4 Runtime type information
171(3)
Determining if a message will respond to a message
171(1)
Sending a message generated at runtime
171(2)
Adding new methods to a class at runtime
173(1)
8.5 Practical uses of runtime type introspection
174(2)
8.6 Summary
176(1)
9 Memory management
177(24)
9.1 Object ownership
178(1)
9.2 Reference counting
179(5)
Releasing an object
180(1)
Retaining an object
181(1)
Determining the current retain count
182(2)
9.3 Autorelease pools
184(6)
What is an autorelease pool?
185(1)
Adding objects to the autorelease pool
185(1)
Creating a new autorelease pool
185(2)
Releasing objects in a pool
187(1)
Why not use an autorelease pool for everything?
187(3)
9.4 Memory zones
190(2)
9.5 Rules for object ownership
192(1)
9.6 Responding to low-memory warnings
193(6)
Implementing the UIApplicationDelegate protocol
193(1)
Overriding didReceiveMemmyWarning
194(3)
Observing the UIApplicationDidReceiveMemoryWarningNotification
197(2)
9.7 Summary
199(2)
Part 3 Making Maximum Use Of Framework Functionality 201(87)
10 Error and exception handling
203(9)
10.1 NSError-handling errors the Cocoa way
204(2)
Getting NSError to talk
204(1)
Examining NSError's userinfo Dictionary
205(1)
10.2 Creating NSError objects
206(4)
Introducing RentalManagerAPI
206(3)
Handling and displaying RentalManagerAPI errors
209(1)
10.3 Exceptions
210(1)
Throwing exceptions
210(1)
Catching exceptions
211(1)
10.4 Summary
211(1)
11 Key-Value Coding and NSPredicate
212(16)
11.1 Making your objects KVG-compliant
213(4)
Accessing properties via KVC
214(1)
Constructing key paths
215(1)
Returning multiple values
215(1)
Aggregating and collating values
216(1)
11.2 Handling special cases
217(2)
Handling unknown keys
217(1)
Handling nil values
218(1)
11.3 Filtering and matching with predicates
219(5)
Evaluating a predicate
219(1)
Filtering a collection
220(1)
Expressing your predicate condition
220(1)
More complex conditions
221(1)
Using key paths in predicate expressions
222(1)
Parameterizing and templating predicate expressions
223(1)
11.4 Sample application
224(3)
11.5 Summary
227(1)
12 Reading and writing application data
228(29)
12.1 Core Data history
229(2)
What does Core Data do?
229(2)
12.2 Core Data objects
231(1)
Managed object context
231(1)
Persistent store coordinator
231(1)
Managed object model
232(1)
Persistent object store
232(1)
12.3 Core Data resources
232(2)
Core Data entities
232(1)
Core Data attributes
233(1)
Core Data relationships
234(1)
12.4 Building the PocketTasks application
234(17)
Examining the Xcode Core Data template
234(1)
Building the data model
235(1)
Defining the relationships
236(1)
Creating Person entities in pure code
237(2)
Fetching Person entities in pure code
239(1)
Adding a master Table View
240(3)
Adding and deleting people
243(6)
Man aging tasks 246 Using model objects
249(2)
12.5 Beyond the basics
251(5)
Changing the data model
251(2)
Performance
253(1)
Error handling and validation
253(3)
12.6 Summary
256(1)
13 Blocks and Grand Central Dispatch
257(19)
13.1 The syntax of blocks
258(7)
Blocks are closures
260(2)
Blocks and memory management
262(2)
Block-based APIs in Apple's iOS frameworks
264(1)
13.2 Performing work asynchronously
265(9)
Meet GCD
266(1)
GCD fundamentals 266 Building RealEstateViewer
267(4)
Making the image search asynchronous
271(2)
Making the image loading asynchronous
273(1)
13.3 Summary
274(2)
14 Debugging techniques
276(12)
14.1 Building an application, complete with bugs
277(1)
14.2 Understanding NSLog
278(3)
14.3 Bringing memory leaks under control with Instruments
281(3)
14.4 Detecting zombies
284(2)
14.5 Summary
286(2)
Appendix A Installing the iOS SDK 288(5)
Appendix B The basics of C 293(19)
Appendix C Alternatives to Objective-C 312(15)
Index 327
A New Zealand based developer,





Christopher Fairbairn has 10 years

experience developing mobile applications on Palm OS, Windows Mobile,

iPhone and J2ME. He's active in the developer community and blogs at

http://www.christec.co.nz/blog/, and his efforts in the Windows Mobile

community earned him a Microsoft Most Valuable Professional award.

Collin Ruffenach is a mobile developer for ELC Technologies. He creates

a variety of iPhone applications for both the iPhone and iPad. He received

his master's degree from Arizona State University in 2010.