Ios 4 Cookbook

Páginas: 379 (94746 palabras) Publicado: 16 de abril de 2012
Download from Wow! eBook

iOS 4 Programming Cookbook

Vandad Nahavandipoor

Beijing • Cambridge • Farnham • Köln • Sebastopol • Tokyo

iOS 4 Programming Cookbook
by Vandad Nahavandipoor
Copyright © 2011 Vandad Nahavandipoor. All rights reserved.
Printed in the United States of America.
Published by O’Reilly Media, Inc., 1005 Gravenstein Highway North, Sebastopol, CA 95472.O’Reilly books may be purchased for educational, business, or sales promotional use. Online editions
are also available for most titles (http://my.safaribooksonline.com). For more information, contact our
corporate/institutional sales department: (800) 998-9938 or corporate@oreilly.com.

Editors: Andy Oram and Brian Jepson
Production Editor: Kristen Borg
Copyeditor: Audrey Doyle
Proofreader: AndreaFox
Production Services: Molly Sharp

Indexer: Fred Brown
Cover Designer: Karen Montgomery
Interior Designer: David Futato
Illustrator: Robert Romano

Printing History:
January 2011:

First Edition.

Nutshell Handbook, the Nutshell Handbook logo, and the O’Reilly logo are registered trademarks of
O’Reilly Media, Inc. iOS 4 Programming Cookbook, the image of an Egyptian mongoose, andrelated
trade dress are trademarks of O’Reilly Media, Inc.
Many of the designations used by manufacturers and sellers to distinguish their products are claimed as
trademarks. Where those designations appear in this book, and O’Reilly Media, Inc., was aware of a
trademark claim, the designations have been printed in caps or initial caps.
While every precaution has been taken in thepreparation of this book, the publisher and author assume
no responsibility for errors or omissions, or for damages resulting from the use of the information contained herein.

TM

This book uses RepKover™, a durable and flexible lay-flat binding.
ISBN: 978-1-449-38822-5
[M]
1294927300

To Agnieszka Marta Dybowska.

Table of Contents

Preface . . . . . . . . . . . . . . . . . . . . . . . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xi
1. Working with Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.1 Implementing and Using Custom Objects
1.2 Allocating and Initializing Objects
1.3 Defining Two or More Methods with the Same Name
in an Object
1.4 Defining andAccessing Properties
1.5 Managing Properties Manually
1.6 Reusing a Block of Code
1.7 Communicating with Objects
1.8 Invoking the Selectors of an Object Dynamically
1.9 Managing Memory with the iOS SDK
1.10 Managing Untyped Objects

2
6
8
11
13
16
19
25
27
29

2. Implementing Controllers and Views . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
2.1
2.22.3
2.4
2.5
2.6
2.7
2.8
2.9
2.10
2.11
2.12
2.13
2.14

Getting and Using the Application Delegate
Managing the Views in Your Application
Creating Your Application’s GUI
Making Your View Controller Available at Runtime
Using a View in Your Application’s GUI
Managing Master-Detail Views
Managing Multiple Views
Incorporating and Using Models in the GUI
Implementing NavigationBars
Switching from One View to Another
Setting the Title on a Navigation Bar
Displaying an Image for the Title of the Navigation Bar
Creating and Managing Buttons on a Navigation Bar
Removing a View from a Navigation Controller

31
33
35
37
39
41
48
50
54
61
62
63
64
69

v

2.15 Manipulating a Navigation Controller’s Array of
View Controllers
2.16 Incorporating a Tab Barinto Your Application
2.17 Pop Up Additional Information over iPad UI Elements

70
71
74

3. Constructing and Using Table Views . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
3.1 Creating a Table View Using Interface Builder
3.2 Creating a Table View Using Code
3.3 Assigning an Event Handler to a Table View Using
Interface Builder
3.4 Assigning an...
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • Iosa
  • es el IOS
  • Practicas de Laboratorio Cisco IOS 4
  • IOS de Cisco
  • Funciones de IOS
  • Tp ios
  • IOS Paper
  • Ios Profundos

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS