HOW THIS BOOK IS STRUCTURED

This book teaches how to build a simple iOS app in iOS 7 from concept to release. Its approach is based on my personal experience of creating my first iOS app. You start with an idea for an app called Bands that gets fleshed out into a set of features. You then learn about Objective-C and the design concepts that are the foundation of Cocoa Touch and the iOS SDK. From there you start to build the Bands app by progressively building the project from what is essentially a “Hello World” app to a final app that includes all features you can find in many popular iOS apps.

If you are new to Objective-C and Cocoa Touch, I recommend taking the time to understand the key concepts and design patterns explained in Chapter 2 before starting on the Bands app in Chapter 3. If you have used Xcode before and have created a “Hello World” app or more complicated apps but would like to learn how to use Storyboard scenes and segues, you can skip ahead to Chapter 4. The more advanced features of the Bands app begin with Chapter 7. Because this book builds on a single project, it is recommended beginners read the book from beginning to end. However, the features are tackled in single chapters and can be applied to any iOS project on which you may be working. If you’re comfortable you can use the example code in those chapters to implement those features in your own project.

广告:个人专属 VPN,独立 IP,无限流量,多机房切换,还可以屏蔽广告和恶意软件,每月最低仅 5 美元

WHAT YOU NEED TO USE THIS BOOK

All iOS apps are built using Xcode, which is available free from the Mac App Store. You need a Mac to run Xcode, because there is no Windows version. Xcode includes the iOS simulator, which you can use to test almost all the code you write throughout the book. There are some features such as taking a picture with the camera that you need a physical iOS device to try. To run an app that is in development on a physical device, you need to be enrolled in the iOS Developer Program, which costs $99/year. Though it’s not required, I would recommend enrolling as early on as possible.

The source code for the samples is available for download from the Wrox website at

www.wrox.com/go/begiosprogramming

CONVENTIONS

To help you get the most from the text and keep track of what’s happening, we’ve used a number of conventions throughout the book.

TRY IT OUT
The Try It Out is an exercise you should work through, following the text in the book.
 
  1. They usually consist of a set of steps.
  2. Each step has a number.
  3. Follow the steps through with your copy of the database.
How It Works
After each Try It Out, the code you’ve typed will be explained in detail.
WARNING Warnings hold important, not-to-be-forgotten information that is directly relevant to the surrounding text.
NOTE Notes indicate notes, tips, hints, tricks, or asides to the current discussion.
As for styles in the text:
 
  • We italicize new terms and important words when we introduce them.
  • We show keyboard strokes like this: Ctrl-A.
  • We show filenames, URLs, and code within the text like so: persistence.properties.
  • We present code in two different ways:
    We use a monofont type with no highlighting for most code examples.

    We use bold to emphasize code that is particularly important in the present context or to show changes from a previous code snippet.

SOURCE CODE

As you work through the examples in this book, you may choose either to type in all the code manually, or to use the source code files that accompany the book. All the source code used in this book is available for download at www.wrox.com. Specifically for this book, the code download is on the Download Code tab at

www.wrox.com/go/begiosprogramming

You can also search for the book at www.wrox.com by ISBN (the ISBN for this book is 978-1-118-84147-1) to find the code. And a complete list of code downloads for all current Wrox books is available at www.wrox.com/dynamic/books/download.aspx.

At the beginning of each chapter, you can find a list of the major code files for the chapter. Throughout each chapter, you’ll also find references to the names of code files as needed in listing titles and text.

Most of the code on www.wrox.com is compressed in a .ZIP, .RAR archive, or similar archive format appropriate to the platform. After you download the code, just decompress it with an appropriate compression tool.

NOTE Because many books have similar titles, you may find it easiest to search by ISBN; this book’s ISBN is 978-1-118-84147-1.

After you download the code, just decompress it with your favorite compression tool. Alternatively, you can go to the main Wrox code download page at www.wrox.com/dynamic/books/download.aspx to see the code available for this book and all other Wrox books.

ERRATA

We make every effort to ensure that there are no errors in the text or in the code. However, no one is perfect, and mistakes do occur. If you find an error in one of our books, like a spelling mistake or faulty piece of code, we would be grateful for your feedback. By sending in errata, you may save another reader hours of frustration, and at the same time, you can help us provide even higher quality information.

To find the errata page for this book, go to

www.wrox.com/go/begiosprogramming

And click the Errata link. On this page you can view all errata that has been submitted for this book and posted by Wrox editors.

If you don’t spot “your” error on the Book Errata page, go to www.wrox.com/contact/techsupport.shtml and complete the form there to send us the error you have found. We’ll check the information and, if appropriate, post a message to the book’s errata page and fix the problem in subsequent editions of the book.

P2P.WROX.COM

For author and peer discussion, join the P2P forums at http://p2p.wrox.com. The forums are a web-based system for you to post messages relating to Wrox books and related technologies, and interact with other readers and technology users. The forums offer a subscription feature to e-mail you topics of interest of your choosing when new posts are made to the forums. Wrox authors, editors, other industry experts, and your fellow readers are present on these forums.

At http://p2p.wrox.com, you can find a number of different forums that can help you, not only as you read this book, but also as you develop your own applications. To join the forums, just follow these steps:

 
  1. Go to http://p2p.wrox.com and click the Register link.
  2. Read the terms of use and click Agree.
  3. Complete the required information to join, as well as any optional information you want to provide, and click Submit.
  4. You will receive an e-mail with information describing how to verify your account and complete the joining process.
NOTE You can read messages in the forums without joining P2P, but to post your own messages, you must join.

After you join, you can post new messages and respond to messages other users post. You can read messages at any time on the web. If you would like to have new messages from a particular forum e-mailed to you, click the Subscribe to this Forum icon by the forum name in the forum listing.

For more information about how to use the Wrox P2P, be sure to read the P2P FAQs for answers to questions about how the forum software works, as well as many common questions specific to P2P and Wrox books. To read the FAQs, click the FAQ link on any P2P page.