Muutke küpsiste eelistusi

E-raamat: Cocoa Programming for Mac OS X

  • Formaat: EPUB+DRM
  • Ilmumisaeg: 09-Nov-2011
  • Kirjastus: Addison-Wesley Educational Publishers Inc
  • Keel: eng
  • ISBN-13: 9780132902205
Teised raamatud teemal:
  • Formaat - EPUB+DRM
  • Hind: 18,03 €*
  • * 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: 09-Nov-2011
  • Kirjastus: Addison-Wesley Educational Publishers Inc
  • Keel: eng
  • ISBN-13: 9780132902205
Teised raamatud teemal:

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. 

The best-selling introduction to Cocoa, once again updated to cover the latest Mac programming technologies, and still enthusiastically recommended by experienced Mac OS X developers. 

Cocoa® Programming for Mac® OS X is considered by most to be the de-facto intro-to-OS X programming text.

Bob Rudis, the Apple Blog

 

I would highly recommend this title to anyone interested in Mac development. Even if you own the previous edition, I think youll find the new and revised content well worth the price.

Bob McCune, bobmccune.com 

If youre developing applications for Mac OS X, Cocoa® Programming for Mac® OS X, Fourth Edition, is the book youve been waiting to get your hands on. If youre new to the Mac environment, its probably the book youve been told to read first.

 

Covering the bulk of what you need to know to develop full-featured applications for OS X, written in an engaging tutorial style, and thoroughly class-tested to assure clarity and accuracy, it is an invaluable resource for any Mac programmer. Specifically, Aaron Hillegass and Adam Preble introduce the two most commonly used Mac developer tools: Xcode and Instruments. They also cover the Objective-C language and the major design patterns of Cocoa. Aaron and Adam illustrate their explanations with exemplary code, written in the idioms of the Cocoa community, to show you how Mac programs should be written. After reading this book, you will know enough to understand and utilize Apples online documentation for your own unique needs. And you will know enough to write your own stylish code.

 

Updated for Mac OS X 10.6 and 10.7, this fourth edition includes coverage of Xcode 4, blocks, view-based table views, Apples new approach to memory management (Automatic Reference Counting), and the Mac App Store. This edition adds a new chapter on concurrency and expands coverage of Core Animation. The book now devotes a full chapter to the basics of iOS development.
Preface xix
Acknowledgments xxi
Chapter 1 Cocoa: What Is It?
1(10)
A Little History
1(2)
Tools
3(1)
Language
4(1)
Objects, Classes, Methods, and Messages
5(1)
Frameworks
6(1)
How to Read This Book
7(1)
Typographical Conventions
7(1)
Common Mistakes
8(1)
How to Learn
8(3)
Chapter 2 Let's Get Started
11(24)
In Xcode
11(4)
Create a New Project
12(3)
The main Function
15(1)
In Interface Builder
15(10)
The Utility Area
16(1)
The Blank Window
16(1)
Lay Out the Interface
17(3)
The Dock
20(1)
Create a Class
20(2)
Create an Instance
22(1)
Make Connections
22(3)
A Look at Objective-C
25(6)
Types and Constants in Objective-C
26(1)
Look at the Header File
26(1)
Edit the Implementation File
27(1)
Build and Run
28(2)
AwakeFromNib
30(1)
Documentation
31(1)
What Have You Done?
31(1)
Chronology of an Application
32(3)
Chapter 3 Objective-C
35(32)
Creating and Using Instances
35(2)
Using Existing Classes
37(11)
Sending Messages to nil
41(2)
NSObject, NSArray, NSMutableArray, and NSString
43(5)
"Inherits from" versus "Uses" or "Knows About"
48(1)
Creating Your Own Classes
48(10)
Creating the LotteryEntry Class
49(2)
Changing main.m
51(1)
Implementing a description Method
52(3)
Writing Initializers
55(1)
Initializers with Arguments
56(2)
The Debugger
58(5)
What Have You Done?
63(1)
Meet the Static Analyzer
63(2)
For the More Curious: How Does Messaging Work?
65(1)
Challenge
66(1)
Chapter 4 Memory Management
67(16)
Living with Manual Reference Counting
69(8)
Leak-Free Lottery
70(2)
Dealloc
72(1)
Autoreleasing Objects
73(3)
The Retain-Count Rules
76(1)
Accessor Methods
77(3)
Living with ARC
80(3)
Strong References
81(1)
Weak References
81(1)
ARC Odds and Ends
82(1)
Chapter 5 Target/Action
83(16)
Some Commonly Used Subclasses of NSControl
85(4)
NSButton
85(1)
NSSlider
86(1)
NSTextField
87(2)
Start the SpeakLine Example
89(1)
Lay Out the XIB File
90(4)
Making Connections in Interface Builder
91(3)
Implementing the SpeakLineAppDelegate Class
94(2)
For the More Curious: Setting the Target Programmatically
96(1)
Challenge
96(2)
Debugging Hints
98(1)
Chapter 6 Helper Objects
99(18)
Delegates
100(4)
The NSTableView and Its dataSource
104(3)
SpeakLineAppDelegate Interface File
105(2)
Lay Out the User Interface
107(2)
Make Connections
109(1)
Edit SpeakLineAppDelegate.m
110(3)
Common Errors in Implementing a Delegate
112(1)
Many Objects Have Delegates
112(1)
For the More Curious: How Delegates Work
113(1)
Challenge: Make a Delegate
114(1)
Challenge: Make a Data Source
114(3)
Chapter 7 Key-Value Coding and Key-Value Observing
117(12)
Key-Value Coding
117(2)
Bindings
119(1)
Key-Value Observing
120(1)
Making Keys Observable
121(3)
Properties
124(2)
Attributes of a Property
125(1)
For the More Curious: Key Paths
126(1)
For the More Curious: Key-Value Observing
127(2)
Chapter 8 NSArrayController
129(16)
Starting the RaiseMan Application
130(9)
RMDocument.xib
134(5)
Key-Value Coding and nil
139(1)
Add Sorting
140(1)
For the More Curious: Sorting without NSArrayController
141(1)
Challenge 1
142(1)
Challenge 2
142(3)
Chapter 9 NSUndoManager
145(14)
NSInvocation
145(1)
How the NSUndoManager Works
146(2)
Adding Undo to RaiseMan
148(4)
Key-Value Coding and To-Many Relationships
148(4)
Key-Value Observing
152(1)
Undo for Edits
153(3)
Begin Editing on Insert
156(2)
For the More Curious: Windows and the Undo Manager
158(1)
Chapter 10 Archiving
159(18)
NSCoder and NSCoding
160(3)
Encoding
160(2)
Decoding
162(1)
The Document Architecture
163(4)
Info.plist and NSDocumentController
163(1)
NSDocument
164(3)
NSWindowController
167(1)
Saving and NSKeyedArchiver
167(1)
Loading and NSKeyedUnarchiver
168(2)
Setting the Extension and Icon for the File Type
170(2)
For the More Curious: Preventing Infinite Loops
172(1)
For the More Curious: Creating a Protocol
173(1)
For the More Curious: Automatic Document Saving
174(1)
For the More Curious: Document-Based Applications without Undo
175(1)
Universal Type Identifiers
175(2)
Chapter 11 Basic Core Data
177(16)
NSManagedObjectModel
177(2)
Interface
179(14)
View-Based Table Views
180(3)
Connections and Bindings
183(6)
How Core Data Works
189(2)
For the More Curious: View-Based versus Cell-Based Table Views
191(1)
Challenge
191(2)
Chapter 12 NIB Files and NSWindowController
193(14)
NSPanel
193(1)
Adding a Panel to the Application
194(10)
Setting Up the Menu Item
197(1)
AppController.m
198(1)
Preferences.xib
198(5)
PreferenceController.m
203(1)
For the More Curious: NSBundle
204(2)
Challenge
206(1)
Chapter 13 User Defaults
207(14)
NSDictionary and NSMutableDictionary
208(2)
NSDictionary
209(1)
NSMutableDictionary
209(1)
NSUserDefaults
210(2)
Precedence of Types of Defaults
211(1)
Setting Defaults
212(1)
The Identifier for the Application
212(1)
Create Keys for the Names of the Defaults
212(1)
Register Defaults
213(1)
Letting the User Edit the Defaults
213(2)
Using the Defaults
215(2)
Suppressing the Creation of Untitled Documents
215(1)
Setting the Background Color on the Table View
216(1)
For the More Curious: NS User Defaults Controller
217(1)
For the More Curious: Reading and Writing Defaults from the Command Line
217(2)
Challenge
219(2)
Chapter 14 Using Notifications
221(8)
What Notifications Are and Are Not
221(1)
What Notifications Are Not
222(1)
NSNotification
222(1)
NSNotificationCenter
222(2)
Posting a Notification
224(1)
Registering as an Observer
225(1)
Handling the Notification When It Arrives
226(1)
The userInfo Dictionary
226(1)
For the More Curious: Delegates and Notifications
227(1)
Challenge
228(1)
Chapter 15 Using Alert Panels
229(4)
Make the User Confirm the Deletion
230(2)
Challenge
232(1)
Chapter 16 Localization
233(8)
Localizing a NIB File
234(2)
String Tables
236(3)
Creating String Tables
237(1)
Using the String Table
238(1)
For the More Curious: Ibtool
239(1)
For the More Curious: Explicit Ordering of Tokens in Format Strings
240(1)
Chapter 17 Custom Views
241(16)
The View Hierarchy
241(2)
Get a View to Draw Itself
243(5)
Create an Instance of a View Subclass
243(1)
Size Inspector
244(2)
DrawRect
246(2)
Drawing with NSBezierPath
248(2)
NSScrollView
250(2)
Creating Views Programmatically
252(1)
For the More Curious: Cells
253(2)
For the More Curious: Isflipped
255(1)
Challenge
255(2)
Chapter 18 Images and Mouse Events
257(14)
NSResponder
257(1)
NSEvent
257(2)
Getting Mouse Events
259(1)
Using NSOpenPanel
259(5)
Change the XIB File
260(3)
Edit the Code
263(1)
Composite an Image onto Your View
264(2)
The View's Coordinate System
266(2)
Autoscrolling
268(1)
For the More Curious: NSImage
269(1)
Challenge
270(1)
Chapter 19 Keyboard Events
271(14)
NSResponder
273(1)
NSEvent
273(1)
Create a New Project with a Custom View
274(8)
Lay Out the Interface
274(2)
Make Connections
276(2)
Write the Code
278(4)
For the More Curious: Rollovers
282(2)
The Fuzzy Blue Box
284(1)
Chapter 20 Drawing Text with Attributes
285(10)
NSFont
285(1)
NSAttributedString
286(3)
Drawing Strings and Attributed Strings
289(1)
Making Letters Appear
289(2)
Getting Your View to Generate PDF Data
291(2)
For the More Curious: NSFontManager
293(1)
Challenge 1
293(1)
Challenge 2
294(1)
Chapter 21 Pasteboards and Nil-Targeted Actions
295(12)
NSPasteboard
296(2)
Add Cut, Copy, and Paste to BigLetterView
298(2)
Nil-Targeted Actions
300(3)
Looking at the XIB File
301(2)
For the More Curious: Which Object Sends the Action Message?
303(1)
For the More Curious: UTIs and the Pasteboard
303(1)
Custom UTIs
303(1)
For the More Curious: Lazy Copying
304(1)
Challenge 1
305(1)
Challenge 2
305(2)
Chapter 22 Categories
307(4)
Add a Method to NSString
307(2)
For the More Curious: Declaring Private Methods
309(2)
Chapter 23 Drag-and-Drop
311(10)
Make BigLetterView a Drag Source
312(3)
Starting a Drag
312(2)
After the Drop
314(1)
Make BigLetterView a Drag Destination
315(4)
Register For Dragged Types
316(1)
Add Highlighting
316(1)
Implement the Dragging Destination Methods
317(1)
Add a Second BigLetterView
318(1)
For the More Curious: Operation Mask
319(2)
Chapter 24 NSTimer
321(8)
Lay Out the Interface
323(2)
Make Connections
325(1)
Add Code to TutorController
326(2)
For the More Curious: NSRunLoop
328(1)
Challenge
328(1)
Chapter 25 Sheets
329(10)
Adding a Sheet
330(5)
Add Outlets and Actions
331(1)
Lay Out the Interface
331(3)
Add Code
334(1)
For the More Curious: Contextinfo
335(1)
For the More Curious: Modal Windows
336(3)
Chapter 26 Creating NSFormatters
339(14)
A Basic Formatter
341(6)
Create ColorFormatter.h
341(1)
Edit the XIB File
342(2)
NSColorList
344(1)
Searching Strings for Substrings
344(1)
Implement the Basic Formatter Methods
345(2)
The Delegate of the NSControl Class
347(1)
Checking Partial Strings
348(2)
Formatters That Return Attributed Strings
350(1)
For the More Curious: NSValueTransformer
351(2)
Chapter 27 Printing
353(6)
Dealing with Pagination
353(5)
For the More Curious: Are you Drawing to the Screen?
358(1)
Challenge
358(1)
Chapter 28 Web Services
359(12)
RanchForecast Project
360(8)
NSURLConnection
361(2)
Add XML Parsing to ScheduleFetcher
363(3)
Lay Out the Interface
366(2)
Write Controller Code
368(1)
Opening URLs
368(1)
Challenge: Add a WebView
369(2)
Chapter 29 Blocks
371(12)
Block Syntax
373(8)
Memory and Objects within Blocks
375(1)
Availability of Blocks
376(1)
RanchForecast: Going Asynchronous
376(1)
Receiving the Asynchronous Response
377(4)
Challenge: Design a Delegate
381(2)
Chapter 30 Developing for iOS
383(14)
Porting RanchForecast to iOS
383(3)
ScheduleFetcher
386(1)
RootViewController
386(2)
Add a Navigation Controller
388(3)
Schedule ViewController
391(1)
UITableViewController
392(1)
Pushing View Controllers
393(2)
Challenge
395(2)
Chapter 31 View Swapping
397(10)
Get Started
398(9)
Create the ManagedViewController Class
399(1)
Create ViewControllers and their XIB files
400(1)
Add View Swapping to MyDocument
401(2)
Resizing the Window
403(4)
Chapter 32 Core Data Relationships
407(10)
Edit the Model
407(2)
Create Custom NSManagedObject Classes
409(2)
Employee
409(1)
Department
410(1)
Lay Out the Interface
411(3)
EmployeeView.xib
413(1)
Events and nextResponder
414(3)
Chapter 33 Core Animation
417(10)
Scattered
417(6)
Implicit Animation and Actions
423(2)
More on CALayer
425(1)
Challenge 1
425(1)
Challenge 2
425(2)
Chapter 34 Concurrency
427(14)
Multithreading
427(4)
A Deep Chasm Opens Before You
428(1)
Simple Cocoa Background Threads
429(2)
Improving Scattered: Time Profiling in Instruments
431(4)
Introducing Instruments
431(4)
NSOperationQueue
435(3)
Multithreaded Scattered
435(2)
Thread Synchronization
437(1)
For the More Curious: Faster Scattered
438(1)
Challenge
439(2)
Chapter 35 Cocoa and OpenGL
441(10)
A Simple Cocoa/OpenGL Application
442(9)
Lay Out the Interface
442(4)
Write Code
446(5)
Chapter 36 NSTask
451(10)
ZIPspector
451(9)
Asynchronous Reads
456(1)
iPing
456(4)
Challenge: .tar and .tgz files
460(1)
Chapter 37 Distributing Your App
461(10)
Build Configurations
461(3)
Preprocessor Macros and Using Build Configurations to Change Behavior
462(2)
Creating a Release Build
464(2)
Application Sandboxing
466(2)
Entitlements
467(1)
Mediated File Access and Powerbox
468(1)
The Mac App Store
468(3)
Chapter 38 The End
471(2)
Index 473
Aaron Hillegass, who worked at NeXT and Apple, now teaches popular Cocoa programming classes at Big Nerd Ranch. At NeXT, he wrote the first course on OpenStep, the predecessor to todays Cocoa tools. This book is based on the big Nerd Ranch course and is influenced by more than a decade of work with OpenStep and Cocoa.

 

Adam Preble learned Cocoa programming from the first edition of this book. After too many years of professional C/C++ development, today Adam writes Mac and iOS applications at Big Nerd Ranch, where he is also a Cocoa instructor. He is frequently filling in the gaps between work and family time with pinball machine software development and countless other projects.