- Cocoa Programming For Os X Pdf Filter
- Cocoa Programming For Os X Pdf Printer
- Cocoa Programming For Os X Pdf Editor
Home > Store
Share|
Register your product to gain access to bonus material or receive a coupon.
For programming Mac OS X with Cocoa for Beginners using Mac OS X versions 10.7 'Lion', or 10.8 'Mountain Lion' or later, use the following wikibook instead: Programming Mac OS X with Cocoa for Beginners 2nd Edition It is suggested that you upgrade to 10.8, 'Mountain Lion' because it is better supported by Apple. And if anyone is looking for a user-end PDF-printer, this cups-pdf-for-mac-os-x is one that works through the installer, however I have the same issue of no file appearing in the indicated directory when I download the source and follow the instructions in the readme. If anyone can get either of these to work on a mac through the terminal.
- By David Chisnall
- Published Dec 29, 2009 by Addison-Wesley Professional. Part of the Developer's Library series.
Best Value Purchase
Book + eBook Bundle
- Your Price: $70.19
- List Price: $116.98
- Includes EPUB, MOBI, and PDF
This eBook includes the following formats, accessible from your Account page after purchase:
EPUBThe open industry format known for its reflowable content and usability on supported mobile devices.
MOBIThe eBook format compatible with the Amazon Kindle and Amazon Kindle applications.
PDFThe popular standard, used most often with the free Adobe® Reader® software.
This eBook requires no passwords or activation to read. We customize your eBook by discreetly watermarking it with your name, making it uniquely yours.
More Purchase Options
Book
- Your Price: $51.99
- List Price: $64.99
- Usually ships in 24 hours.
eBook (Watermarked)
- Your Price: $41.59
- List Price: $51.99
- Includes EPUB, MOBI, and PDF
This eBook includes the following formats, accessible from your Account page after purchase:
EPUBThe open industry format known for its reflowable content and usability on supported mobile devices.
MOBIThe eBook format compatible with the Amazon Kindle and Amazon Kindle applications.
PDFThe popular standard, used most often with the free Adobe® Reader® software.
This eBook requires no passwords or activation to read. We customize your eBook by discreetly watermarking it with your name, making it uniquely yours.
Description
- Copyright 2010
- Dimensions: 7' x 9'
- Pages: 936
- Edition: 1st
- Book
- ISBN-10: 0-321-63963-4
- ISBN-13: 978-0-321-63963-9
The Cocoa programming environment—Apple’s powerful set of clean, object-oriented APIs—is increasingly becoming the basis of almost all contemporary Mac OS X development. With its long history of constant refinement and improvement, Cocoa has matured into a sophisticated programming environment that can make Mac OS X application development quick, efficient, and even fun.
Yet for all its refined elegance and ease of use, the staggering size of the Cocoa family of APIs and the vast magnitude of the official documentation can be intimidating to even seasoned programmers.
To help Mac OS X developers sort through and begin to put to practical use Cocoa’s vast array of tools and technologies, Cocoa Programming Developer’s Handbook provides a guided tour of the Cocoa APIs found on Mac OS X, thoroughly discussing—and showing in action—Cocoa’s core frameworks and other vital components, as well as calling attention to some of the more interesting but often overlooked parts of the APIs and tools.
This book provides expert insight into a wide range of key topics, from user interface design to network programming and performance tuning.
Extras
Cocoa Programming For Os X Pdf Filter
Related Articles
Sample Content
Online Sample Chapter
Sample Pages
Download the sample pages (includes Chapter 4 and Index)
Table of Contents
Part I: Introducing Cocoa
Chapter 1: Cocoa and Mac OS X
1.1 Understanding When to Use Cocoa
1.2 Understanding Cocoa's Role in Mac OS X
1.3 Overview
Chapter 2: Cocoa Language Options
2.1 Object Orientation
2.2 Objective-C
2.3 Ruby and Python
2.4 Summary
Chapter 3: Using Apple's Developer Tools
3.1 Obtaining Apple's Developer Tools
3.2 Interface Builder
3.3 XCode
3.4 Objective-C
3.5 Cocoa Conventions
3.6 Summary
Part II: The Cocoa Frameworks
Chapter 4: Foundation: The Objective-C Standard Library
4.1 General Concepts
4.2 Core Foundation Types
4.3 Basic Data Types
4.4 Collections
4.5 Enumeration
4.6 Property Lists
4.7 Interacting with the Filesystem
4.8 Notifications
4.9 Summary
Chapter 5: Application Concepts
5.1 Run Loops
5.2 Applications and Delegates
5.3 The Responder Chain
5.4 Run Loops in Applications
5.5 Delegates and Notifications
5.6 The View Hierarchy
5.7 Summary
Chapter 6: Creating Graphical User Interfaces
6.1 Positioning Views
6.2 Nested Views
6.3 Creating Views
6.4 Cocoa Bindings
6.5 Summary
Chapter 7: Windows and Menus
7.1 Understanding Windows
7.2 Creating Windows
7.3 Creating Window Objects
7.4 Panels
7.5 Sheets
7.6 Alert Dialogs
7.7 Menus
7.8 Summary
Chapter 8: Text in Cocoa
8.1 Constructing and Deconstructing Strings
8.2 Annotating Strings
8.3 Localization
8.4 Text Storage
8.5 Understanding Fonts
8.6 Displaying Text
8.7 Writing a Custom Text Container
8.8 Using Multiple Text Views
8.9 Summary
Part III: Cocoa Documents
Chapter 9: Creating Document-Driven Applications
9.1 The Cocoa Document Model
9.2 Creating the Application Skeleton
9.3 Creating the Document
9.4 Extending the Outliner
9.5 Supporting Undo
9.6 Adding Undo to the Outliner
9.7 Summary
Chapter 10: Core Data
10.1 Introducing Data Modeling
10.2 Understanding Managed Objects
10.3 Attribute Types
10.4 Creating a Data Model
10.5 Choosing a Persistent Store
10.6 Storing Metadata
10.7 Automatic Undo
10.8 Core Data, Spotlight, and Time Machine
10.9 Summary
Part IV: Complex User Interfaces
Chapter 11: Working with Structured Data
11.1 Data Sources and Delegates
11.2 Tables
11.3 Outline Views
11.4 Browsers
11.5 Collection Views
11.6 Customizing Views with New Cells
11.7 Creating Master-Detail Views
11.8 Summary
Chapter 12: Dynamic Views
12.1 Tabbed Views
12.2 Inspecting the View Hierarchy
12.3 Modifying the View Hierarchy
12.4 Creating Dynamic Input Forms
12.5 Full-Screen Applications
12.6 Summary
Part V: Advanced Graphics
Chapter 13: Custom Views
13.1 The Graphics Context
13.2 Core Graphics
13.3 AppKit Drawing
13.4 Printing and Paginating Views
13.5 Extending Interface Builder with Palettes
13.6 Summary
Chapter 14: Sound and Video
14.1 Beeping
14.2 Playing Simple Sounds
14.3 Understanding Cocoa Movie Objects
14.4 Adding Video
14.5 Editing Media
14.6 Low-Level Sound APIs
14.7 Sound and Video Recording
14.8 Supporting Speech
14.9 Cocoa Speech Synthesis
14.10 Conversing with Users
14.11 Summary
Chapter 15: Advanced Visual Effects
15.1 Simple Animation
15.2 Core Animation Overview
15.3 Understanding Animation Concepts
15.4 Adding Simple Animations
15.5 Image Filters
15.6 Defining Transitions
15.7 Creating Complex Animations
15.8 3D Core Animation Transforms
15.9 OpenGL and Cocoa Views
15.10 Quartz Composer
15.11 Summary
Chapter 16: Supporting PDF and HTML
16.1 HTML in AppKit
16.2 Advanced HTML Support
16.3 Dynamic Interfaces with WebKit
16.4 PDF and Quartz
16.5 Displaying PDFs
16.6 Summary
Part VI: User Interface Integration
Chapter 1: Cocoa and Mac OS X
1.1 Understanding When to Use Cocoa
1.2 Understanding Cocoa's Role in Mac OS X
1.3 Overview
Chapter 2: Cocoa Language Options
2.1 Object Orientation
2.2 Objective-C
2.3 Ruby and Python
2.4 Summary
Chapter 3: Using Apple's Developer Tools
3.1 Obtaining Apple's Developer Tools
3.2 Interface Builder
3.3 XCode
3.4 Objective-C
3.5 Cocoa Conventions
3.6 Summary
Part II: The Cocoa Frameworks
Chapter 4: Foundation: The Objective-C Standard Library
4.1 General Concepts
4.2 Core Foundation Types
4.3 Basic Data Types
4.4 Collections
4.5 Enumeration
4.6 Property Lists
4.7 Interacting with the Filesystem
4.8 Notifications
4.9 Summary
Chapter 5: Application Concepts
5.1 Run Loops
5.2 Applications and Delegates
5.3 The Responder Chain
5.4 Run Loops in Applications
5.5 Delegates and Notifications
5.6 The View Hierarchy
5.7 Summary
Chapter 6: Creating Graphical User Interfaces
6.1 Positioning Views
6.2 Nested Views
6.3 Creating Views
6.4 Cocoa Bindings
6.5 Summary
Chapter 7: Windows and Menus
7.1 Understanding Windows
7.2 Creating Windows
7.3 Creating Window Objects
7.4 Panels
7.5 Sheets
7.6 Alert Dialogs
7.7 Menus
7.8 Summary
Chapter 8: Text in Cocoa
8.1 Constructing and Deconstructing Strings
8.2 Annotating Strings
8.3 Localization
8.4 Text Storage
8.5 Understanding Fonts
8.6 Displaying Text
8.7 Writing a Custom Text Container
8.8 Using Multiple Text Views
8.9 Summary
Part III: Cocoa Documents
Chapter 9: Creating Document-Driven Applications
9.1 The Cocoa Document Model
9.2 Creating the Application Skeleton
9.3 Creating the Document
9.4 Extending the Outliner
9.5 Supporting Undo
9.6 Adding Undo to the Outliner
9.7 Summary
Chapter 10: Core Data
10.1 Introducing Data Modeling
10.2 Understanding Managed Objects
10.3 Attribute Types
10.4 Creating a Data Model
10.5 Choosing a Persistent Store
10.6 Storing Metadata
10.7 Automatic Undo
10.8 Core Data, Spotlight, and Time Machine
10.9 Summary
Part IV: Complex User Interfaces
Chapter 11: Working with Structured Data
11.1 Data Sources and Delegates
11.2 Tables
11.3 Outline Views
11.4 Browsers
11.5 Collection Views
11.6 Customizing Views with New Cells
11.7 Creating Master-Detail Views
11.8 Summary
Chapter 12: Dynamic Views
12.1 Tabbed Views
12.2 Inspecting the View Hierarchy
12.3 Modifying the View Hierarchy
12.4 Creating Dynamic Input Forms
12.5 Full-Screen Applications
12.6 Summary
Part V: Advanced Graphics
Chapter 13: Custom Views
13.1 The Graphics Context
13.2 Core Graphics
13.3 AppKit Drawing
13.4 Printing and Paginating Views
13.5 Extending Interface Builder with Palettes
13.6 Summary
Chapter 14: Sound and Video
14.1 Beeping
14.2 Playing Simple Sounds
14.3 Understanding Cocoa Movie Objects
14.4 Adding Video
14.5 Editing Media
14.6 Low-Level Sound APIs
14.7 Sound and Video Recording
14.8 Supporting Speech
14.9 Cocoa Speech Synthesis
14.10 Conversing with Users
14.11 Summary
Chapter 15: Advanced Visual Effects
15.1 Simple Animation
15.2 Core Animation Overview
15.3 Understanding Animation Concepts
15.4 Adding Simple Animations
15.5 Image Filters
15.6 Defining Transitions
15.7 Creating Complex Animations
15.8 3D Core Animation Transforms
15.9 OpenGL and Cocoa Views
15.10 Quartz Composer
15.11 Summary
Chapter 16: Supporting PDF and HTML
16.1 HTML in AppKit
16.2 Advanced HTML Support
16.3 Dynamic Interfaces with WebKit
16.4 PDF and Quartz
16.5 Displaying PDFs
16.6 Summary
Part VI: User Interface Integration
Chapter 17: Searching and Filtering
17.1 Maintaining Document Indexes
17.2 Displaying Search Boxes
17.3 Searching for Documents
17.4 Spotlight
17.5 Predicates
17.6 Quick Look
17.7 Summary
Chapter 18: Contacts, Calendars, and Secrets
18.1 Address Book Overview
18.2 Getting Information About People
18.3 Searching the Address Book
18.4 Populating the 'Me' vCard
18.5 Adding People to the Address Book
18.6 Storing Secrets
18.7 Calendars
18.8 Synchronizing Data
18.9 Summary
Chapter 19: Pasteboards
19.1 Pasteboard Overview
19.2 Pasteboard Types
19.3 Filtered Types
19.4 Property List Data
19.5 Self-Encoding Objects
19.6 Files and Pasteboards
19.7 Copy and Paste
19.8 Drag and Drop
19.9 Drag and Drop with Data Views
19.10 Summary
Chapter 20: Services
20.1 Example Services
20.2 An Evaluate Service
20.3 Using Services
20.4 Controlling the Services Menu
20.5 Filter Services
20.6 Summary
Chapter 21: Adding Scripting
21.1 Scripting Overview
21.2 Making Objects Scriptable
21.3 Scripting from Cocoa
21.4 Exposing Services to Automator
21.5 Other Scripting Technologies
21.6 Summary
Part VII: System Programming
Chapter 22: Networking
22.1 Low-Level Socket Programming
22.2 Cocoa Streams
22.3 URL Handling
22.4 Bonjour
22.5 Distributed Objects
22.6 Summary
Chapter 23: Concurrency
23.1 Distributed Objects
23.2 Threading
23.3 Child Processes
23.4 Operation Queues
23.5 Grand Central Dispatch
23.6 OpenCL
23.7 Summary
Part VIII: Appendixes
Chapter 24: Portable Cocoa
24.1 NeXT and Sun
24.2 Mobile OS X on the iPhone
24.3 OpenStep and GNU
24.4 GNUstep
24.5 QuantumSTEP
24.6 Cocotron
24.7 GNUstepWeb and SOPE
Chapter 25: Advanced Tricks
25.1 The Preprocessor
25.2 Control Structures
25.3 Clean Code
25.4 Optimization
25.5 Cross-Platform Cocoa
25.6 The Runtime System
More Information
- Request an Instructor or Media review copy.
Cocoa Programming For Os X Pdf Printer
Other Things You Might Like
- Book $39.99
- eBook (Watermarked) $31.99
- Book $55.99
Khmer unicode keyboard for windows 10. The Cocoa application layer is primarily responsible for the appearance of apps and their responsiveness to user actions. In addition, many of the features that define the OS X user experience—such as Notification Center, full-screen mode, and Auto Save—are implemented by the Cocoa layer.
Note: In this book, Cocoa usually refers to the application layer of OS X. In other Apple technical documents, Cocoa frequently refers to all programmatic interfaces that you might use to develop an app, regardless of the layer in which those interfaces reside.
The term Aqua refers to the overall appearance and behavior of OS X. The Aqua look and feel is characterized by consistent, user-friendly behaviors combined with a masterful use of layout, color, and texture. Although much of the Aqua look and feel comes for free when you use Cocoa technologies to develop your app, there are still many steps you should take to distinguish your app from the competition. To create a beautiful, compelling app that users will love, be sure to follow the guidance provided in OS X Human Interface Guidelines.
Cocoa Programming For Os X Pdf Editor
High-Level Features
The Cocoa (Application) layer implements many features that are distinctive aspects of the OS X user experience. Users expect to find these features throughout the system, so it’s a good idea to support all the features that make sense in your app.
Notification Center
Notification Center provides a way for users to receive and view app notifications in an attractive, unobtrusive way. For each app, users can specify how they want to be notified of an item’s arrival; they can also reveal Notification Center to view all the items that have been delivered.
The Notification Center APIs, which help you configure the user-visible portions of a notification item, schedule items for delivery, and find out when items have been delivered. You can also determine whether your app has launched as a result of a notification, and if it has, whether that notification is a local or remote (that is, push) notification.
To learn about integrating the Notification Center into your app, see NSUserNotificationCenter Class Reference and NSUserNotification Class Reference. To ensure that your app gives users the best Notification Center experience, read Notification Center. In addition, you can add items to the Today view using a Today extension, see Today in the App Extension Programming Guide.
Game Center
Game Center accesses the same social-gaming network as on iOS, allowing users to track scores on a leaderboard, compare their in-game achievements, invite friends to play a game, and start a multiplayer game through automatic matching. Game Center functionality is provided in three parts:
- The Game Center app, in which users sign in to their account, discover new games and new friends, add friends to their gaming network, and browse leaderboards and achievements.
- The Game Kit framework, which contains the APIs developers use to support live multiplayer or turn-based games and adopt other Game Center features, such as in-game voice chat and leaderboard access.
- The online Game Center service supported by Apple, which performs player authentication, provides leaderboard and achievement information, and handles invitations and automatching for multiplayer games. You interact with the Game Center service only indirectly, using the Game Kit APIs.
Note: To support Game Center in a game developed for OS X, you must sign the app with a provisioning profile that enables Game Center. To learn more about provisioning profiles, see Provisioning Your System.
In your game, use the Game Kit APIs to post scores and achievements to the Game Center service and to display leaderboards in your user interface. You can also use Game Kit APIs to help users find others to play with in a multiplayer game.
To learn more about adding Game Center support to your app, see Game Center Programming Guide.
Sharing
The sharing service provides a consistent user experience for sharing content among many types of services. For example, a user might want to share a photo by posting it in a Twitter message, attaching it to an email, or sending it to another Mac user via AirDrop.
Use the AppKit
NSSharingService
class to get information about available services and share items with them directly. As a result, you can display a custom UI to present the services. You can also use the NSSharingServicePicker
class to display a list of sharing services (including custom services that you define) from which the user can choose. When a service is performed, the system-provided sharing window is displayed, where the user can comment or add recipients.Resume
Resume is a systemwide enhancement of the user experience that supports app persistence. A user can log out or shut down the operating system, and on next login or startup, OS X automatically relaunches the apps that were last running and restores the windows that were last opened. If your app provides the necessary support, reopened windows have the same size and location as before; in addition, window contents are scrolled to the previous position and selections are restored.
To support app persistence, you must also implement automatic and sudden app termination, user interface preservation, and Auto Save. See, Automatic and Sudden Termination of Apps, User Interface Preservation, and Documents Are Automatically Saved in the Mac App Programming Guide.
Full-Screen Mode
When an app enters full-screen mode it opens its frontmost app or document window in a separate space. Enabling full-screen mode adds an Enter Full Screen menu item to the View menu or, if there is no View menu, to the Window menu. When a user chooses this menu item, the frontmost app or document window fills the entire screen.
The AppKit framework provides support for customizing the appearance and behavior of full-screen windows. For example, you can set a window-style mask and can implement custom animations when an app enters and exits full-screen mode.
You enable and manage full-screen support through methods of the
NSApplication
and NSWindow
classes and the NSWindowDelegate Protocol
protocol. To find out more about this feature, read Implementing the Full-Screen Experience in Mac App Programming Guide.Cocoa Auto Layout
Cocoa Auto Layout is a rule-based system designed to implement the layout guidelines described in OS X Human Interface Guidelines. It expresses a larger class of relationships and is more intuitive to use than springs and struts.
Using Auto Layout brings you a number of benefits:
- Localization through swapping of strings alone, instead of also revamping layouts
- Mirroring of UI elements for right-to-left languages such as Hebrew and Arabic
- Better layering of responsibility between objects in the view and controller layersA view object usually knows best about its standard size and its positioning within its superview and relative to its sibling views. A controller can override these values if something nonstandard is required.
The entities you use to define a layout are Objective-C objects called constraints. You define constraints by combining attributes—such as leading, trailing, left, right, top, bottom, width, and height—that encapsulate the relationships between UI elements. (Leading and trailing are similar to left and right, but they are more expressive because they automatically mirror the constraint in a right-to-left environment.) In addition, you can assign priority levels to constraints, to identify the constraints that are most important to satisfy.
You can use Interface Builder to add and edit constraints for your interface. When you need more control, you can work with constraints programatically.
For more information on Auto Layout, see Auto Layout Guide.
Popovers
A popover is a view that displays additional content related to existing content onscreen. AppKit provides the
NSPopover
class to support popovers. AppKit automatically positions a popover relative to the view containing the existing content—known as the positioning view—and it moves the popover when the popover’s positioning view moves.You configure the appearance and behavior of a popover, including which user interactions cause the popover to close. And by implementing the appropriate delegate method, you can configure a popover to detach itself and become a separate window when a user drags it.
For more information, see NSPopover Class Reference and NSPopoverDelegate Protocol Reference. For guidelines on using popovers, see Popovers in OS X Human Interface Guidelines.
Software Configuration
OS X programs commonly use property list files (also known as plist files) to store configuration data. A property list is a text or binary file used to manage a dictionary of key-value pairs. Apps use a special type of property list file, called an information property list (
Info.plist
) file, to communicate key attributes of the app—such as the app’s name, unique identification string, and version information—to the system. Apps also use property list files to store user preferences or other custom configuration data.The advantage of property list files is that they are easy to edit and modify from outside the runtime environment of your app. Jmron for mac os x. Xcode includes a built-in property list editor for editing your app’s
Info.plist
file. To learn more about information property list files and the keys you put in them, see Runtime Configuration Guidelines and Information Property List Key Reference. To learn how to edit a property list file in Xcode, see Edit Keys and Values.Inside your app, you can read and write property list files programmatically using facilities found in both Core Foundation and Cocoa. For more information on creating and using property lists programmatically, see Property List Programming Guide or Property List Programming Topics for Core Foundation.
Accessibility
Accessibility is the successful access to information and information technologies by the millions of people who have some type of disability or special need. OS X provides many built-in features and assistive technologies that help users with special needs benefit from the Mac. OS X also provides software developers with the functions they need to create apps that are accessible to all users.
Apps that use Cocoa interfaces receive significant support for accessibility automatically. For example, apps get the following support for free:
- Zoom features let users increase the size of onscreen elements.
- Picture keeper for os x. Sticky keys let users press keys sequentially instead of simultaneously for keyboard shortcuts.
- Mouse keys let users control the mouse with the numeric keypad.
- Full keyboard access mode lets users complete any action using the keyboard instead of the mouse.
- Speech recognition lets users speak commands rather than type them.
- Text-to-speech reads text to users with visual disabilities.
- VoiceOver provides spoken user interface features to assist visually impaired users.
Although Cocoa integrates accessibility support into its APIs, there might still be times when you need to provide more descriptive information about your windows and controls. The Accessibility section of the Xcode Identity inspector makes it easy to provide custom accessibility information about the UI elements in your app. Or you can use the appropriate accessibility interfaces to change the settings programmatically.
For more information about accessibility, see Accessibility Programming Guide for OS X.
AppleScript
OS X employs AppleScript as the primary language for making apps scriptable. With AppleScript, users can write scripts that link together the services of multiple scriptable apps.
When designing new apps, you should consider AppleScript support early in the process. The key to a good design that supports AppleScript is choosing an appropriate data model for your app. The design must not only serve the purposes of your app but also make it easy for AppleScript implementers to manipulate your content. After you settle on a data model, you can implement the Apple event code needed to support scripting.
To learn how to support AppleScript in your programs, see Applescript Overview.
Spotlight
Spotlight provides advanced search capabilities for apps. The Spotlight server gathers metadata from documents and other relevant user files and incorporates that metadata into a searchable index. The Finder uses this metadata to provide users with more relevant information about their files. For example, in addition to listing the name of a JPEG file, the Finder can also list its width and height in pixels.
App developers use Spotlight in two different ways. First, you can search for file attributes and content using the Spotlight search API. Second, if your app defines its own custom file formats, you should incorporate any appropriate metadata information in those formats and provide a Spotlight importer plug-in to return that metadata to Spotlight.
Note: You should not use Spotlight for indexing and searching the general content of a file. Spotlight is intended for searching only the metainformation associated with files. To search the actual contents of a file, use Search Kit. For more information on Search Kit, see Other Frameworks in the Core Services Layer.
For more information on using Spotlight in your apps, see Spotlight Overview.
Ink Services
Ink Services provides handwriting recognition for apps that support the Cocoa and WebKit text systems and any text system that supports input methods. The automatic support is for text and handwriting gestures (which are defined in the Ink panel). The Ink framework offers several features that you can incorporate into your apps, including the following:
- Enabling or disabling handwriting recognition programmatically
- Accessing Ink data directly
- Supporting either deferred recognition or recognition on demand
- Supporting the direct manipulation of text by means of gestures
The Ink Services feature is implemented by the Ink framework (
Ink.framework
). The Ink framework is not intended solely for developers of end-user apps. Hardware developers can also use it to implement a handwriting recognition solution for a new input device. You might also use the Ink framework to implement your own correction model to provide users with a list of alternate interpretations for handwriting data. The Ink framework is a subframework of
Carbon.framework
; you should link to it directly with the umbrella framework, not with Ink.framework
. For more information on using Ink Services in Cocoa apps, see Using Ink Services in Your Application.Frameworks
The Cocoa (Application) layer includes the frameworks described in the following sections.
Cocoa Umbrella Framework
The Cocoa umbrella framework (
Cocoa.framework
) imports the core Objective-C frameworks for app development: AppKit, Foundation, and Core Data. - AppKit (
AppKit.framework
). This is the only framework of the three that is actually in the Cocoa layer. See AppKit for a summary of AppKit features and classes. - Foundation (
Foundation.framework
). The classes of the Foundation framework (which resides in the Core Services layer) implement data management, file access, process notification, network communication, and other low-level features. AppKit has a direct dependency on Foundation because many of its methods and functions either take instances of Foundation classes as parameters, or return the instances as values.To find out more about Foundation, see Foundation and Core Foundation. - Core Data (
CoreData.framework
). The classes of the Core Data framework (which also resides in the Core Services layer) manage the data model of an app based on the Model-View-Controller design pattern. Although Core Data is optional for app development, it is recommended for apps that deal with large data sets.For more information about Core Data, see Core Data.
AppKit
AppKit is the key framework for Cocoa apps. The classes in the AppKit framework implement the user interface (UI) of an app, including windows, dialogs, controls, menus, and event handling. They also handle much of the behavior required of a well-behaved app, including menu management, window management, document management, Open and Save dialogs, and pasteboard (Clipboard) behavior.
In addition to having classes for windows, menus, event handling, and a wide variety of views and controls, AppKit has window- and data-controller classes and classes for fonts, colors, images, and graphics operations. A large subset of classes comprise the Cocoa text system, described in Text, Typography, and Fonts. Other AppKit classes support document management, printing, and services such as spellchecking, help, speech, and pasteboard and drag-and-drop operations.
Apps can participate in many of the features that make the user experience of OS X such an intuitive, productive, and rewarding experience. These features include the following:
- Gestures. Users appreciate being able to use fluid, intuitive Multi-Touch gestures to interact with OS X. AppKit classes make it easy to adopt these gestures in your app and to provide a better zoom experience without redrawing your content. For example,
NSScrollView
includes built-in support for the smart zoom gesture (that is, a two-finger double-tap on a trackpad). When you provide the semantic layout of your content,NSScrollView
can intelligently magnify the content under the pointer. You can also use this class to respond to the lookup gesture (that is, a three-finger tap on a trackpad). To learn more about the gesture support thatNSScrollView
provides, see NSScrollView Class Reference. - Spaces. Spaces lets the user organize windows into groups and switch back and forth between groups to avoid cluttering up the desktop. AppKit provides support for sharing windows across spaces through the use of collection behavior attributes on the window. For information about setting these attributes, see NSWindow Class Reference.
- Fast User Switching. With this feature, multiple users can share access to a single computer without logging out. One user’s session can continue to run, while another user logs in and accesses the computer. To support fast user switching, be sure that your app avoids doing anything that might affect another version of the app running in a different session. To learn how to implement this behavior, see Multiple User Environment Programming Topics.
Xcode includes Interface Builder, a user interface editor that contains a library of AppKit objects, such as controls, views, and controller objects. With it, you can create most of your UI (including much of its behavior) graphically rather than programatically. With the addition of Cocoa bindings and Core Data, you can also implement most of the rest of your app graphically.
For an overview of the AppKit framework, see the introduction to the Application Kit Framework Reference. Mac App Programming Guide offers a practical discussion of how you use mostly AppKit classes to implement an app’s user interface, its documents, and its overall behavior.
Game Kit
The Game Kit framework (
GameKit.framework
) provides APIs that allow your app to participate in Game Center. For example, you can use Game Kit classes to display leaderboards in your game and to give users the opportunity to share their in-game achievements and play multiplayer games. To learn more about using Game Kit in your app, see Game Kit Framework Reference.
Preference Panes
The Preference Panes framework (
PreferencePanes.framework
) lets you create plug-ins containing a user interface for setting app preferences. At runtime, the System Preferences app (or your app) can dynamically load the plug-in and present the settings UI to users. In System Preferences, each icon in the Show All view represents an individual preference pane plug-in. You typically implement preference pane plug-ins when your app lacks its own user interface or has a very limited UI but needs to be configurable. In these cases, you create both the plug-in and the app-specific code that reads and writes the preference settings.For more information about creating preference-pane plug-ins, see Preference Pane Programming Guide.
Screen Saver
The Screen Saver framework (
ScreenSaver.framework
) contains classes for creating dynamically loadable bundles that implement screen savers. Users can select your screen saver in the Desktop & Screen Saver pane of the System Preferences app. Screen Saver helps you implement the screen saver view and preview and manage screen saver preferences.To learn more about creating screen savers, see Screen Saver Framework Reference. Also read the technical note Building Screen Savers for Snow Leopard for additional information.
Security Interface
The Security Interface framework (
SecurityInterface.framework
) contains classes that provide UI elements for programs implementing security features such as authorization, access to digital certificates, and access to items in keychains. There are classes for creating custom views and standard security controls, for creating panels and sheets for presenting and editing certificates, for editing keychain settings, and for presenting and allowing selection of identities.For more information about the Security Interface framework, see Security Interface Framework Reference.
Copyright © 2004, 2015 Apple Inc. All Rights Reserved. Terms of Use | Privacy Policy | Updated: 2015-09-16