Siêu thị PDFTải ngay đi em, trời tối mất

Thư viện tri thức trực tuyến

Kho tài liệu với 50,000+ tài liệu học thuật

© 2023 Siêu thị PDF - Kho tài liệu học thuật hàng đầu Việt Nam

beginning ios application development with html and javascript
PREMIUM
Số trang
436
Kích thước
21.7 MB
Định dạng
PDF
Lượt xem
873

beginning ios application development with html and javascript

Nội dung xem thử

Mô tả chi tiết

www.it-ebooks.info

ffirs.indd iv 12/21/11 2:29:58 PM

www.it-ebooks.info

BEGINNING

IOS APPLICATION DEVELOPMENT

WITH HTML AND JAVASCRIPT®

INTRODUCTION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxiii

PART I GETTING STARTED

CHAPTER 1 Introducing iOS Development Using Web Technologies . . . . . . . . . . . . . 3

CHAPTER 2 Working with Core Technologies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

CHAPTER 3 The Document Object Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47

CHAPTER 4 Writing Your First Hello World Application . . . . . . . . . . . . . . . . . . . . . . . . 65

CHAPTER 5 Enabling and Optimizing Web Sites for the iPhone and iPad . . . . . . . . 79

PART II APPLICATION DESIGN

CHAPTER 6 Designing the iPhone UI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99

CHAPTER 7 Designing for iPad . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117

CHAPTER 8 Styling with CSS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135

PART III APPLICATION DEVELOPMENT

CHAPTER 9 Programming the Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153

CHAPTER 10 Handling Touch Interactions and Events . . . . . . . . . . . . . . . . . . . . . . . . . 189

CHAPTER 11 Special Eff ects and Animation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207

CHAPTER 12 Integrating with iOS Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223

CHAPTER 13 Packaging Apps as Bookmarks: Bookmarklets

and Data URLs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235

PART IV ADVANCED PROGRAMMING TECHNIQUES

CHAPTER 14 Programming the Canvas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251

CHAPTER 15 Offl ine Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269

CHAPTER 16 Building with Web App Frameworks . . . . . . . . . . . . . . . . . . . . . . . . . . . . 287

CHAPTER 17 Bandwidth and Performance Optimizations . . . . . . . . . . . . . . . . . . . . . . 303

CHAPTER 18 Debug and Deploy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 317

ffirs.indd i 12/21/11 2:29:56 PM

www.it-ebooks.info

PART V NEXT STEPS: DEVELOPING NATIVE IOS APPLICATIONS

WITH HTML AND JAVASCRIPT

CHAPTER 19 Preparing for Native iOS Development . . . . . . . . . . . . . . . . . . . . . . . . . . 333

CHAPTER 20 PhoneGap: Native Apps from Your HTML, CSS,

and JavaScript . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 345

CHAPTER 21 Submitting Your App to the App Store . . . . . . . . . . . . . . . . . . . . . . . . . . . 363

APPENDIX Exercise Answers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 375

INDEX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .381

ffirs.indd ii 12/21/11 2:29:58 PM

www.it-ebooks.info

BEGINNING

iOS Application Development

with HTML and JavaScript®

ffirs.indd iii 12/21/11 2:29:58 PM

www.it-ebooks.info

ffirs.indd iv 12/21/11 2:29:58 PM

www.it-ebooks.info

BEGINNING

iOS Application Development

with HTML and JavaScript®

Richard Wagner

John Wiley & Sons, Inc.

ffirs.indd v 12/21/11 2:29:58 PM

www.it-ebooks.info

Beginning iOS Application Development with HTML and JavaScript®

Published by

John Wiley & Sons, Inc.

10475 Crosspoint Boulevard

Indianapolis, IN 46256

www.wiley.com

Copyright © 2012 by John Wiley & Sons, Inc., Indianapolis, Indiana

Published simultaneously in Canada

ISBN: 978-1-118-15900-2

ISBN: 978-1-118-22607-0 (ebk)

ISBN: 978-1-118-23751-9 (ebk)

ISBN: 978-1-118-26405-8 (ebk)

Manufactured in the United States of America

10 9 8 7 6 5 4 3 2 1

No part of this publication may be reproduced, stored in a retrieval system or transmitted in any form or by any means,

electronic, mechanical, photocopying, recording, scanning or otherwise, except as permitted under Sections 107 or 108

of the 1976 United States Copyright Act, without either the prior written permission of the Publisher, or authorization

through payment of the appropriate per-copy fee to the Copyright Clearance Center, 222 Rosewood Drive, Danvers,

MA 01923, (978) 750-8400, fax (978) 646-8600. Requests to the Publisher for permission should be addressed to the

Permissions Department, John Wiley & Sons, Inc., 111 River Street, Hoboken, NJ 07030, (201) 748-6011, fax (201)

748-6008, or online at http://www.wiley.com/go/permissions.

Limit of Liability/Disclaimer of Warranty: The publisher and the author make no representations or warranties with

respect to the accuracy or completeness of the contents of this work and specifi cally disclaim all warranties, including

without limitation warranties of fi tness for a particular purpose. No warranty may be created or extended by sales or

promotional materials. The advice and strategies contained herein may not be suitable for every situation. This work is

sold with the understanding that the publisher is not engaged in rendering legal, accounting, or other professional

services. If professional assistance is required, the services of a competent professional person should be sought. Neither

the publisher nor the author shall be liable for damages arising herefrom. The fact that an organization or Web site is

referred to in this work as a citation and/or a potential source of further information does not mean that the author or the

publisher endorses the information the organization or Web site may provide or recommendations it may make. Further,

readers should be aware that Internet Web sites listed in this work may have changed or disappeared between when this

work was written and when it is read.

For general information on our other products and services please contact our Customer Care Department within the

United States at (877) 762-2974, outside the United States at (317) 572-3993 or fax (317) 572-4002.

Wiley publishes in a variety of print and electronic formats and by print-on-demand. Some material included with

standard print versions of this book may not be included in e-books or in print-on-demand. If this book refers to

media such as a CD or DVD that is not included in the version you purchased, you may download this material at

http://booksupport.wiley.com. For more information about Wiley products, visit www.wiley.com.

Library of Congress Control Number: 2011945668

Trademarks: Wiley, the Wiley logo, Wrox, the Wrox logo, Wrox Programmer to Programmer, and related trade dress are

trademarks or registered trademarks of John Wiley & Sons, Inc. and/or its affi liates, in the United States and other coun￾tries, and may not be used without written permission. JavaScript is a registered trademark of Oracle America, Inc. All

other trademarks are the property of their respective owners. John Wiley & Sons, Inc., is not associated with any product

or vendor mentioned in this book.

ffirs.indd vi 12/21/11 2:30:03 PM

www.it-ebooks.info

To KimmyWags and the J-Team

ffirs.indd vii 12/21/11 2:30:03 PM

www.it-ebooks.info

ffirs.indd viii 12/21/11 2:30:04 PM

www.it-ebooks.info

ABOUT THE AUTHOR

RICHARD WAGNER is Lead Product Architect of Mobile/Web at Maark, LLC. Previously, he was

the head of engineering for the Web scripting company Nombas and VP of Product Development

for NetObjects, where he was the chief architect of a CNET award-winning JavaScript tool named

NetObjects ScriptBuilder. He is an experienced web designer and developer and the author of

several Web-related books on the underlying technologies of the iOS application platform.

ffirs.indd ix 12/21/11 2:30:04 PM

www.it-ebooks.info

ffirs.indd x 12/21/11 2:30:04 PM

www.it-ebooks.info

CREDITS

EXECUTIVE EDITOR

Carol Long

PROJECT EDITOR

Kelly Talbot

TECHNICAL EDITOR

Michael Gilbert

PRODUCTION EDITOR

Kathleen Wisor

COPY EDITOR

Charlotte Kughen

EDITORIAL MANAGER

Mary Beth Wakefi eld

FREELANCER EDITORIAL MANAGER

Rosemarie Graham

ASSOCIATE DIRECTOR OF MARKETING

David Mayhew

MARKETING MANAGER

Ashley Zurcher

BUSINESS MANAGER

Amy Knies

PRODUCTION MANAGER

Tim Tate

VICE PRESIDENT AND EXECUTIVE GROUP

PUBLISHER

Richard Swadley

VICE PRESIDENT AND EXECUTIVE

PUBLISHER

Neil Edde

ASSOCIATE PUBLISHER

Jim Minatel

PROJECT COORDINATOR, COVER

Katie Crocker

PROOFREADER

Sheilah Ledwidge, Word One

INDEXER

Robert Swanson

COVER DESIGNER

Ryan Sneed

COVER IMAGE

© Sam Burt Photography / iStockPhoto

ffirs.indd xi 12/21/11 2:30:04 PM

www.it-ebooks.info

ffirs.indd xii 12/21/11 2:30:05 PM

www.it-ebooks.info

ACKNOWLEDGMENTS

THE IPHONE AND IPAD HAVE EMERGED as my favorite pieces of technology I have ever owned. As

such, the topic of iOS application development has been a joy to write about. However, the book

was also a joy because of the stellar team I had working with me on this book. First and foremost,

I’d like to thank Kelly Talbot for his masterful role as project editor. He kept the project on track

and running smoothly from start to fi nish. I’d also like to thank Michael Gilbert for his insights and

ever-watchful eye that ensured technical accuracy in this book. Further, thanks also to Charlotte

Kughen for her editing prowess.

ffirs.indd xiii 12/21/11 2:30:05 PM

www.it-ebooks.info

Tải ngay đi em, còn do dự, trời tối mất!