Tải bản đầy đủ (.pdf) (7 trang)

a0127 learn objective c ma morebook vn 5859

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (622.63 KB, 7 trang )

Companion

eBook

Available

Learn Objective-C on the Mac

Everything You Need to Know
to Become an Objective-C Guru

Learn Objective-C
on the Mac

Dalrymple
Knaster

Mark Dalrymple | Scott Knaster

spine = 0.8382" 360 page count



Learn Objective-C
on the Mac

Penciled by MARK DALRYMPLE
Inked by SCOTT KNASTER


Learn Objective-C on the Mac


Copyright © 2009 by Mark Dalrymple and Scott Knaster
All rights reserved. No part of this work may be reproduced or transmitted in any form or by any means, electronic
or mechanical, including photocopying, recording, or by any information storage or retrieval system, without the
prior written permission of the copyright owner and the publisher.
ISBN-13 (pbk): 978-1-4302-1815-9
ISBN-13 (electronic): 978-1-4302-1816-6
Printed and bound in the United States of America 9 8 7 6 5 4 3 2 1
Trademarked names may appear in this book. Rather than use a trademark symbol with every occurrence of a
trademarked name, we use the names only in an editorial fashion and to the benefit of the trademark owner, with
no intention of infringement of the trademark.
Java™ and all Java-based marks are trademarks or registered trademarks of Sun Microsystems, Inc., in the US
and other countries. Apress, Inc., is not affiliated with Sun Microsystems, Inc., and this book was written without
endorsement from Sun Microsystems, Inc.
Lead Editors: Clay Andres and Dave Mark
Technical Reviewer: Jeff LaMarche
Editorial Board: Clay Andres, Steve Anglin, Mark Beckner, Ewan Buckingham, Tony Campbell, Gary Cornell,
Jonathan Gennick, Michelle Lowman, Matthew Moodie, Jeffrey Pepper, Frank Pohlmann, Ben Renow-Clarke,
Dominic Shakeshaft, Matt Wade, Tom Welsh
Project Manager: Denise Santoro Lincoln
Copy Editor: Heather Lang
Associate Production Director: Kari Brooks-Copony
Production Editor: Laura Esterman
Compositor/Artist/Interior Designer: Diana Van Winkle
Proofreader: Greg Teague
Indexer: Toma Mulligan
Cover Designer: Kurt Krames
Manufacturing Director: Tom Debolski
Distributed to the book trade worldwide by Springer-Verlag New York, Inc., 233 Spring Street, 6th Floor,
New York, NY 10013. Phone 1-800-SPRINGER, fax 201-348-4505, e-mail ,
or visit .

For information on translations, please contact Apress directly at 2855 Telegraph Avenue, Suite 600, Berkeley,
CA 94705. Phone 510-549-5930, fax 510-549-5939, e-mail , or visit .
Apress and friends of ED books may be purchased in bulk for academic, corporate, or promotional use.
eBook versions and licenses are also available for most titles. For more information, reference our Special
Bulk Sales–eBook Licensing web page at />The information in this book is distributed on an “as is” basis, without warranty. Although every precaution has
been taken in the preparation of this work, neither the author(s) nor Apress shall have any liability to any person or
entity with respect to any loss or damage caused or alleged to be caused directly or indirectly by the information
contained in this work.
The source code for this book is available to readers at .


For Jerri Shertzer—teacher, mentor, friend
—Mark


INDEX

code folding, 117
Code Sense (code completion), 106
collapsing/expanding a section of code, 116
command-line parameters, 29
Command Line Utility, 6
comments, fixing manually, 112
completion menu as a quick API class reference,
107
Console window, 7
continue button, 126
converting NSEnumerator loops into fast
enumeration, 148
.cpp file extension, 8

creating the Hello Objective-C program, 5
datatips, 128
debugger controls, 126
debugging, 123
delimiters, closing up, 108
documentation and reference materials for, 121
documentation bookmarks, 123
Edit all in Scope mode, 110
Editor icon, 104
emacs, list of key bindings, 113
features for writing code easier, 105
Find in Project command, 109
focus ribbon, 116
Foundation Tool, 6
function menu, 118
GDB debugger, 124
GNU Compiler Collection (GCC), 8
Groups & Files pane, 90, 103–104
Groups, setting up, 90
gutter, 116, 124
highlighting a section of code, 116
included files menu, 120
indenting source code, 105
Key Bindings pane, 105
keyboard shortcuts, table of, 129
kissing the parentheses, 108
launch arguments, 29
lock icon, 120
making a file read-only, 120
making a new Cocoa Application project, 250

.m file extension, 8
navigating around source code, 113
navigating up and down a class hierarchy, 119
navigation bar, 118

New Project, 6
objc_exception_throw, 144
opening a source file in its own window, 104
organizing the project and source code editors,
103
organizing the source files in an Xcode project,
90
#pragma mark, 119
program state, definition of, 128
projectwide search and replace, 109
project window, 6, 90
property list editor, 268
quickly opening a header file, 115
recovering from a previous snapshot, 109
refactoring tools, 111
Re-indent selection, 105
Research Assistant window, 121
running a program with the debugger, 124
search box, using, 104, 114
searching Apple’s official API documentation, 122
selecting Breakpoints from the Run menu, 143
selecting File, New File, 88, 91
selecting Objective-C class, 88, 91
single-stepping through code, 126
Snapshot checkbox, 112

Snapshot Failed error message, 109
splitting the source window in half, 120
standard boilerplate code in newly created files,
90
step out button, 128
step over button, 126
supplying a file path in, 29
syntax coloring, 111
taking a snapshot of the project state, 109
Targets, 104
Treat Warnings as Errors checkbox, 12
using a Debug build configuration, 124
using Objective-C++, 312
using the program defaults, 101
working with Xcode 3.1, 101
See also Cocoa
.xib files, definition of, 253

Z

zone, definition of, 238

337


Offer valid through 6/09.




×