Learning iOS Programming 3rd Edition

所需积分/C币:9 2014-06-11 13:04:47 11.37MB PDF
0
收藏 收藏
举报

英文第三版,介绍ios app开发,以及object C的开发 March 2013出品
HIRD EDITION Learning ioS Programming Alasdair allan O'REILLY Beijing. Cambridge. Farnham.KoIn. Sebastopol Tokyo Learning ioS Programming third edition by Alasdair Allan Copyright C 2013 Alasdair Allan. All rights reserved Printed in the United States of america Published by O reilly Media, Inc, 1005 Gravenstein Highway North, Sebastopol, CA 95472 OReilly books may be purchased for educational, business, or sales promotional use Online editions are alsoavailableformosttitles(http://my.safaribooksonline.com).fOrmoreinformation,contactourcorporate institutionalsalesdepartment800-998-9938orcorporate@oreilly.com Editor: Rachel roumeliotis Cover Designer: Randy comer Production Editor: Kristen Borg Interior Designer: David Futato Proofreader: rachel leach llustrator: Rebecca demarest Indexers: Fred Brown and Meghan Jones March 2013 Third edition Revision History for the Third Edition: 2013-03-05: First release Seehttp://oreilly.com/catalog/errata.csp?isbn=9781449359348forreleasedetails Nutshell Handbook, the Nutshell Handbook logo, and the O Reilly logo are registered trademarks ofO Reilly Media, Inc. Learning iOS Programming, the image of a lapwing, and related 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 trade mark claim, the designations have been printed in caps or initial caps While every precaution has been taken in the preparation 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 ISBN:978-1-449-35934-8 Table of contents Preface 1. Why Go Native? The Pros and cons Why Write Native applications? The Release Cycle Build It and They Will Come 2. Becoming a developer Registering as an ios developer Enrolling in the iOS Developer Program 10 The Mac Developer Program Installing the iOS SDK What Happens When There Is a Beta? 16 Preparing Your iOS Device 16 Creating a Development Certificate 17 Getting the UDID of Your Development Device 20 Creating an App ID 20 Creating a Mobile Provisioning Profile 21 Making Your Device Available for Development 22 3. Your First iOS App. ,25 Objective-C Basics 25 Object-Oriented Programming 25 The Objective-C Object Model 28 The Basics of Objective-C Syntax 29 Creating a Project 30 Exploring the Project in Xcode 34 Our Project in Interface Builder 42 Building the User Interface Connecting the User Interface to the Code Running the Application in the Simulator 49 Putting the Application on Your iPhone 51 4. Coding in Objective-C. 53 Declaring and Defining Classes 5 Declaring a Class with the Interface 53 Defining a Class with the Implementation 55 Object Typing 55 Properties 56 Synthesizing Properties The Dot syntax 58 Declaring Methods 58 Calling Methods Calling Methods on nil Memory Management 60 Creating objects The Autorelease pool 61 The alloc, retain, copy, and release Cycle 62 Automatic Reference Counting The dealloc method 64 Responding to memory warning 64 Fundamental iOS Design Patterns The Model-View-Controller Pattern Views and view Controllers 66 The Delegates and Data Source Pattern 67 Conclusion 67 5. Table View-Based Applications. Creating the project Creating a Table view 70 Running the Code Populating the table view Building a Model 79 Adding Cities to the Guide 81 Adding images to Your projects 84 Connecting the Controller to the model 86 Mocking Up Functionality with Alert Windows Adding navigation Controls to the application Adding a city v g 92 Edit mode 104 Table of contents Deleting a City Entry 107 Adding a city entry 108 The Add New City Interface Capturing the city data 119 6.0 ther view〔 ontrollers 127 Utility applications 127 Making the Battery Monitoring Application 129 Tab Bar Applications 140 Adding Another Tab Bar Item 142 Combining view Controllers 147 Modal view Controllers 154 Modifying the City Guide application 154 The Image Picker View Controller 165 Adding the Image Picker to the City Guide application 165 Master-Detail applications 175 Creating a Universal application 175 Popover Controllers 182 7. Connecting to the Network.........................185 Detecting Network Status 185 Apple's reachability Class 185 Embedding a Web Browser in Your App 200 imple Web view Controller 200 Displaying Static HTML Files 210 Getting data Out of a uiweb view 211 ending Email 211 Getting Data from the Internet 217 Synchronous requests 217 Asynchronous Requests 218 Using Web Services 219 8. Handling Data. 237 Data Entry 237 UITextField and Its Delegate 238 UIText View and Its Delegate 240 Parsing XMl 242 Parsing Xml with libxml2 242 Parsing XMl with NSXMLParser 244 Parsing son 245 NSISONSerialization 245 The json Framework 247 Table of Contents Retrieving twitter Trends 248 Using the Social Framework The Twitter Trends Application 251 Regular expressions 260 Introduction to Regular expressions 260 Storing Data 265 Using Flat Files 265 Storing Information in a SQL Database 266 Core data 274 9. Using Sensors.…275 Hardware Support 275 Network Availability 277 Camera availability 277 Audio Input availability 277 GPS Availability 278 Magnetometer Availability 278 Setting Required Hardware Capabilities 278 Persistent wifi 281 Background Modes 281 Differences between iphone and iPad 281 Using the camera 282 The Core Motion framework 283 Pulling Motion Data 284 Pushing motion data 284 The Accelerometer 285 The gyroscope 291 The magnetometer 294 Accessing the Proximity Sensor 298 U ng 300 10. Geolocation and Mapping............ 301 The Core Location framework 301 De Head g 304 Location-Dependent Weather 305 Reverse geocoding ng 306 Forward geocoding 307 CLPlacemark Objects 307 Modifying the Weather Application 308 User Location and mapkit 317 ⅵi| Table of contents Annotating maps 325 11. Introduction to icloud ,33 How Can i use iCloud? 333 iCloud Backup 334 Provisioning Your Application for iCloud 334 Using Key-V alue storms ge 337 pping up 346 12. Integrating Your Application Application Preferences 349 The Accounts framework 361 The Social framework 363 Send g Tweets 363 Making Posts to Facebook 366 Custom URL Schemes 366 U ing Custom Schemes g 366 Registering Custom Schemes 367 Media playback 373 USing the Address Book 378 Interactive People Picking 378 Programmatic People Picking 383 Sending Text Messages 383 13. Distributing Your Application Adding missing Features 385 Adding an icon 385 Adding a Launch Image 390 Changing the Display Name 393 Enabling rotation 394 Building and Signing 396 Ad Hoc Distribution 397 Developer-to-Developer Distribution 403 App Store distributie 403 Submitting to the App store 404 Building Your Application for App Store Distribution 412 The App Store Resource Center 416 Reasons for Rejection 416 14. Going Further. 421 Cocoa and objective-C 421 The iOS SDK 421 Table of Contents Web applications 422 Phone gap 422 Core data 423 In-App Purchase 423 MKStoreKit 424 C ore animation 424 Game Kit 424 Writing games 425 Look and Feel 425 Hardware Accessories 426 Index 鲁。鲁春 ,427 I Table of Contents

...展开详情
试读 127P Learning iOS Programming 3rd Edition
立即下载 低至0.43元/次 身份认证VIP会员低至7折
一个资源只可评论一次,评论内容不能少于5个字
yaorui2568 不错的学习资料,谢谢分享
2015-06-27
回复
b-seo 还成吧,写的一般,有些地方讲的不是很清楚
2014-08-01
回复
上传资源赚积分or赚钱
    最新推荐
    Learning iOS Programming 3rd Edition 9积分/C币 立即下载
    1/127
    Learning iOS Programming 3rd Edition第1页
    Learning iOS Programming 3rd Edition第2页
    Learning iOS Programming 3rd Edition第3页
    Learning iOS Programming 3rd Edition第4页
    Learning iOS Programming 3rd Edition第5页
    Learning iOS Programming 3rd Edition第6页
    Learning iOS Programming 3rd Edition第7页
    Learning iOS Programming 3rd Edition第8页
    Learning iOS Programming 3rd Edition第9页
    Learning iOS Programming 3rd Edition第10页
    Learning iOS Programming 3rd Edition第11页
    Learning iOS Programming 3rd Edition第12页
    Learning iOS Programming 3rd Edition第13页
    Learning iOS Programming 3rd Edition第14页
    Learning iOS Programming 3rd Edition第15页
    Learning iOS Programming 3rd Edition第16页
    Learning iOS Programming 3rd Edition第17页
    Learning iOS Programming 3rd Edition第18页
    Learning iOS Programming 3rd Edition第19页
    Learning iOS Programming 3rd Edition第20页

    试读结束, 可继续阅读

    9积分/C币 立即下载 >