iOS in Practice potx

305 6.5K 0
iOS in Practice potx

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

Bear Cahill Includes 98 Techniques Covers iOS 6 MANNING www.it-ebooks.info iOS in Practice www.it-ebooks.info www.it-ebooks.info iOS in Practice BEAR CAHILL MANNING SHELTER ISLAND www.it-ebooks.info For online information and ordering of this and other Manning books, please visit www.manning.com. The publisher offers discounts on this book when ordered in quantity. For more information, please contact Special Sales Department Manning Publications Co. 20 Baldwin Road PO Box 261 Shelter Island, NY 11964 Email: orders@manning.com ©2013 by Manning Publications Co. All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by means electronic, mechanical, photocopying, or otherwise, without prior written permission of the publisher. Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in the book, and Manning Publications was aware of a trademark claim, the designations have been printed in initial caps or all caps. Recognizing the importance of preserving what has been written, it is Manning’s policy to have the books we publish printed on acid-free paper, and we exert our best efforts to that end. Recognizing also our responsibility to conserve the resources of our planet, Manning books are printed on paper that is at least 15 percent recycled and processed without the use of elemental chlorine. Manning Publications Co. Development editor: Scott Meyers 20 Baldwin Road Technical proofreader: James Hathewa y PO Box 261 Copyeditors: Linda Kern, Benjamin Berg Shelter Island, NY 11964 Proofreaders: Katie Tennant, Alyson Brener Typesetter: Dottie Marsico Cover designer: Marija Tudor ISBN 9781617291265 Printed in the United States of America 1 2 3 4 5 6 7 8 9 10 – MAL – 17 16 15 14 13 12 www.it-ebooks.info To Kelly Ripa, who brightens my wife’s day, who in turn brightens mine www.it-ebooks.info www.it-ebooks.info vii brief contents PART 1 GETTING STARTED 1 1 ■ Getting started with iOS development 3 2 ■ Creating an iOS application 14 PART 2 PUTTING IOS INTO PRACTICE 21 3 ■ Using view controllers and images in PicDecor 23 4 ■ Accessing the address book/contacts in Dial4 60 5 ■ MapKit and the camera in WhereIsMyCar 87 6 ■ Settings, audio, and shake detection in TimeDown 114 7 ■ CoreData, iPod access, and playing music—PlayMyLists 132 8 ■ Push notification and in-app purchase—Rock, Paper, Scissors 157 9 ■ GameCenter leaderboards and achievements—Rock, Paper, Scissors 184 10 ■ iTunes API, iPad, and iAd—MusicSearch 206 11 ■ Collection view, social, reminders, and state restoration— MeetSocial 230 www.it-ebooks.info www.it-ebooks.info ix contents preface xv acknowledgments xvi about this book xvii about the cover illustration xx PART 1 GETTING STARTED 1 1 Getting started with iOS development 3 1.1 The iOS development environment 4 1.2 Using Xcode 4 Getting Xcode 5 ■ Tour of Xcode 5 1.3 A quick Hello World app 8 Creating a New Project 8 ■ Editing the user interface 10 1.4 Summary 13 2 Creating an iOS application 14 2.1 Source code files 15 2.2 Adding a button to your app 16 2.3 Connecting your button to an action 17 2.4 Connecting your label as an outlet 18 2.5 Implementing your button action 19 2.6 Delegation 20 2.7 Summary 20 www.it-ebooks.info [...]... www.it-ebooks.info 49 xi CONTENTS TECHNIQUE 20 TECHNIQUE 21 4.4 5 Summary Adding a MapView to a project 89 Centering and zooming a MapView 91 Finding the user’s location via CoreLocation 93 Displaying details on MapView locations and storing user’s notes 94 Displaying MapView pins 95 Storing and retrieving the user’s location Reverse geocoding 100 Adding pin callouts 101 Typing and storing user’s note... 116 Playing audio and vibrating the device 125 TECHNIQUE 41 TECHNIQUE 42 6.4 114 Adding settings to an Xcode project 116 Initializing iOS settings 118 Accessing settings values in an app 119 Setting the app settings icon 120 Runtime and time-based UI changes TECHNIQUE 39 TECHNIQUE 40 6.3 98 Storing, retrieving, and displaying camera images 107 TECHNIQUE 32 TECHNIQUE 33 TECHNIQUE 34 5.4 87 Using maps... Summary Adding a camera control 108 Receiving and storing the picture 110 Displaying a picture 112 113 Settings, audio, and shake detection in TimeDown 6.1 Settings bundle in iOS projects TECHNIQUE 35 TECHNIQUE 36 TECHNIQUE 37 TECHNIQUE 38 6.2 122 Rounding corners of a view 122 Updating the UI with a repeating timer 124 Playing an MP3 file 126 Vibrating the iPhone 127 Detecting and handling device... PUTTING IOS INTO PRACTICE 21 Using view controllers and images in PicDecor 23 3.1 UI design concepts 24 Building blocks that can be customized 25 Product definition statement 26 Thinking outside the box 26 Think Apple 27 ■ ■ 3.2 Creating view controllers and other widgets TECHNIQUE 1 TECHNIQUE 2 TECHNIQUE 3 3.3 Designing a view controller with IB 27 Adding an ImageView and toolbar to a view Adding... controller Replacing the detail view controller 146 Managing tracks in the selected playlist 147 Accessing iPod music TECHNIQUE 54 TECHNIQUE 55 7.4 Create a project with table navigation 133 Defining entities in CoreData 135 Creating relationships in CoreData 137 Inserting and deleting CoreData objects 139 Creating classes for CoreData entities 141 Summary Playing the playlist 153 Handling music player... its two core aspects—it covers iOS development both in general and in practice Learning happens best through examples and exercises‚ as opposed to learning about theories or concepts in isolation So I’ve included numerous hands-on techniques and examples to get you started in iOS development About the author Bear Cahill has worked in iOS development at Brainwash Inc since 2008 and through the development... everything else! xvi www.it-ebooks.info about this book This book is organized into two parts Part one talks about iOS development in general How to get started, the frameworks provided by Apple, the Provisioning Portal, the IDE, and several core concepts are introduced in this first part of the book The second part includes techniques for putting iOS development into practice The chapters in part... Deleting and rearranging table view rows Filtering displayed table view data 83 MapKit and the camera in WhereIsMyCar 5.1 76 Managing table data 80 TECHNIQUE 22 TECHNIQUE 23 4.5 Making a call 74 Displaying address book record details Summary 128 Detecting shaking with the accelerometer 128 Handling shaking with an action sheet 129 131 www.it-ebooks.info xii CONTENTS 7 CoreData, iPod access, and playing... documentation, including public/open source libraries, as well as the source code for the examples in the book The chapters will then direct you on what to do, one step at a time You will find the source code for the working examples in this book available for download from the publisher’s website at www.manning.com/iOSinPractice You can also find some of the apps developed in this book in the Apple... 196 Matching players 196 Inviting friends to play 200 Voice chat via the GameCenter iTunes API, iPad, and iAd—MusicSearch 10.1 187 192 Adding an achievement in iTunesConnect Reporting achievement progress 193 Displaying achievement boards 195 Matching and playing via GameCenter TECHNIQUE 75 TECHNIQUE 76 TECHNIQUE 77 185 Authenticating the player 185 Configuring leaderboards in iTunesConnect Saving the . Cahill Includes 98 Techniques Covers iOS 6 MANNING www.it-ebooks.info iOS in Practice www.it-ebooks.info www.it-ebooks.info iOS in Practice BEAR CAHILL MANNING SHELTER. development 3 2 ■ Creating an iOS application 14 PART 2 PUTTING IOS INTO PRACTICE 21 3 ■ Using view controllers and images in PicDecor 23 4 ■ Accessing the address

Ngày đăng: 06/03/2014, 23:20

Từ khóa liên quan

Mục lục

  • iOS in Practice

  • brief contents

  • contents

  • preface

  • acknowledgments

  • about this book

    • Roadmap

    • Code conventions

    • Source code downloads

    • About the title

    • About the author

    • Author Online

    • about the cover illustration

    • Part 1 Getting started

      • 1 Getting started with iOS development

        • 1.1 The iOS development environment

        • 1.2 Using Xcode

          • 1.2.1 Getting Xcode

          • 1.2.2 Tour of Xcode

          • 1.3 A quick Hello World app

            • 1.3.1 Creating a New Project

            • 1.3.2 Editing the user interface

            • 1.4 Summary

            • 2 Creating an iOS application

              • 2.1 Source code files

              • 2.2 Adding a button to your app

Tài liệu cùng người dùng

  • Đang cập nhật ...

Tài liệu liên quan