Objectice c

Páginas: 57 (14050 palabras) Publicado: 2 de noviembre de 2011
tObject-Oriented Programming with Objective-C
Tools & Languages: Objective-C

2010-11-15

Apple Inc. © 2010 Apple Inc. All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, mechanical, electronic, photocopying, recording, or otherwise, without prior written permission of Apple Inc., with the followingexceptions: Any person is hereby authorized to store documentation on a single computer for personal use only and to print copies of documentation for personal use provided that the documentation contains Apple’s copyright notice. The Apple logo is a trademark of Apple Inc. No licenses, express or implied, are granted with respect to any of the technology described in this document. Apple retainsall intellectual property rights associated with the technology described in this document. This document is intended to assist application developers to develop applications only for Apple-labeled computers. Apple Inc. 1 Infinite Loop Cupertino, CA 95014 408-996-1010 Apple, the Apple logo, Cocoa, and Objective-C are trademarks of Apple Inc., registered in the United States and other countries.NeXT is a trademark of NeXT Software, Inc., registered in the United States and other countries. IOS is a trademark or registered trademark of Cisco in the U.S. and other countries and is used under license.
Even though Apple has reviewed this document, APPLE MAKES NO WARRANTY OR REPRESENTATION, EITHER EXPRESS OR IMPLIED, WITH RESPECT TO THIS DOCUMENT, ITS QUALITY, ACCURACY, MERCHANTABILITY, ORFITNESS FOR A PARTICULAR PURPOSE. AS A RESULT, THIS DOCUMENT IS PROVIDED “AS IS,” AND YOU, THE READER, ARE ASSUMING THE ENTIRE RISK AS TO ITS QUALITY AND ACCURACY. IN NO EVENT WILL APPLE BE LIABLE FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES RESULTING FROM ANY DEFECT OR INACCURACY IN THIS DOCUMENT, even if advised of the possibility of such damages. THE WARRANTY AND REMEDIES SETFORTH ABOVE ARE EXCLUSIVE AND IN LIEU OF ALL OTHERS, ORAL OR WRITTEN, EXPRESS OR IMPLIED. No Apple dealer, agent, or employee is authorized to make any modification, extension, or addition to this warranty.

Some states do not allow the exclusion or limitation of implied warranties or liability for incidental or consequential damages, so the above limitation or exclusion may not apply to you.This warranty gives you specific legal rights, and you may also have other rights which vary from state to state.

Contents
Introduction

Introduction 7
Who Should Read This Document 7 Organization of This Document 8 See Also 8

Chapter 1 Chapter 2

Why Objective-C? 9 Object-Oriented Programming 11
Data and Operations 11 Interface and Implementation 12

Chapter 3

The Object Model15
The Messaging Metaphor 16 Classes 17 Modularity 18 Reusability 19 Mechanisms of Abstraction 20 Encapsulation 20 Polymorphism 21 Inheritance 22 Class Hierarchies 22 Subclass Definitions 23 Uses of Inheritance 23 Dynamism 24 Dynamic Typing 25 Dynamic Binding 25 Dynamic Loading 27

Chapter 4

Structuring Programs 29
Outlet Connections 29 Extrinsic and Intrinsic Connections 30 Activating theObject Network 31 Aggregation and Decomposition 31 Models and Frameworks 32

3
2010-11-15 | © 2010 Apple Inc. All Rights Reserved.

CONTENTS

Chapter 5

Structuring the Programming Task 35
Collaboration 35 Organizing Object-Oriented Projects 36 Designing on a Large Scale 36 Separating the Interface from the Implementation 36 Dividing the Work into Modules 36 Keeping the Interface Simple37 Making Decisions Dynamically 37 Inheriting Generic Code 37 Reusing Tested Code 37

Document Revision History 39

4
2010-11-15 | © 2010 Apple Inc. All Rights Reserved.

Figures
Chapter 2

Object-Oriented Programming 11
Figure 2-1 Interface and implementation 12

Chapter 3

The Object Model 15
Figure 3-1 Figure 3-2 Figure 3-3 An object 15 Objects in a network 16 An inheritance...
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • Fckc c c c c
  • ahncc c c c
  • ´ç´-ç´-ç´-
  • <c<c<
  • C
  • C
  • C
  • C

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS