Skip to Main Content
Cocoa Programming for Mac OS X, Third Edition
book

Cocoa Programming for Mac OS X, Third Edition

by Aaron Hillegass
May 2008
Intermediate to advanced content levelIntermediate to advanced
464 pages
8h 13m
English
Addison-Wesley Professional
Content preview from Cocoa Programming for Mac OS X, Third Edition

Chapter 25. Sheets

A sheet is simply an NSWindow instance that is attached to another window. The sheet comes down over the window, and the window stops getting events until the sheet is dismissed. Typically, you will compose a sheet as an offscreen window in your nib file.

NSApplication has several methods that make sheets possible:

// Start a sheet
- (void)beginSheet:(NSWindow *)sheet
    modalForWindow:(NSWindow *)docWindow
     modalDelegate:(id)modalDelegate
    didEndSelector:(SEL)didEndSelector
       contextInfo:(void *)contextInfo;

// End the sheet
- (void)endSheet:(NSWindow *)sheet returnCode:(int)returnCode;

Besides the sheet window and the window to which it is attached, you supply a modal delegate, a selector, and a pointer when you start the sheet. The ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

COCOA PROGRAMMING FOR MAC OS X SECOND EDITION

COCOA PROGRAMMING FOR MAC OS X SECOND EDITION

Aaron Hillegass

Publisher Resources

ISBN: 9780321562739Purchase book