文件名称:Learn Cocoa on the Mac, 2nd Edition
文件大小:17.27MB
文件格式:PDF
更新时间:2022-04-03 03:42:34
mac cocoa editio
Welcome! You must be here because you want to write programs for your Mac. Well, you’ve definitely come to the right place. (Here for Pilates? Third door down, on the right.) By the time you finish this book, you’ll know everything you need to know to create fast, efficient, good-looking Mac OS X applications. The key to creating a modern Mac application is Cocoa. According to Apple, Cocoa is a set of object-oriented frameworks that provide a runtime environment for Mac OS X applications. As you make your way through this book, you’ll learn all about the Cocoa frameworks and runtime environment. For the moment, think of Cocoa as a programmer’s assistant that takes care of much of the housekeeping that goes along with Mac development. Almost every common task performed by a Mac application, from drawing a window to blinking the cursor in a text field, is handled for you when you write programs using Cocoa, freeing you up to concentrate on the code that makes your application unique. Cocoa provides a class for just about every one of your development needs. There are Cocoa classes for each piece of the Mac OS X user interface, from windows to menus, scrollbars to buttons, images to icons. If you can think of a user interface element you’d like to add to your own application, chances are very good that element is already implemented as a Cocoa class. Another benefit of using Cocoa is that it is tightly integrated with Mac OS X. Build your application using Cocoa, and your application will play well with others and will interface seamlessly with Mac OS X elements like the Finder and the Dock. Cocoa has been around in one form or another since 1986. The technologies that we call Cocoa evolved from the NeXTStep AppKit, the application building tools developed for the NeXT platform. When Apple bought NeXT in 1996, they began building a new version of the Mac OS, what we now know as OS X, basing much of the new operating system on technologies acquired from NeXT.