Online Book Reader

Home Category

iOS Recipes - Matt Drance [3]

By Root 219 0
ebook, you can also click the gray-green rectangle before the code listings to download that source file directly.


Copyright © 2011, The Pragmatic Bookshelf.

Acknowledgments

We had an all-star cast of reviewers for this book, and they all deserve recognition for giving us even a tiny bit of their incredibly valuable time. Colin Barrett, Mike Clark, Michael Hay, Daniel Steinberg, Justin Williams, and Marcus Zarra were generous, forthcoming, and motivated in helping us make this book as good as it could be. The feedback we received over email, Twitter, iChat, lunches, and the forums at PragProg.com was just as important in getting us to this point. Thank you all for your contributions to this book.

3.1 Matt Drance

You don’t write a book like this unless you love the subject. This book’s subject was born from the tireless effort of hundreds of gifted and passionate people in Cupertino over the better part of the past decade. I must thank my many friends and former colleagues at Apple for creating this wonderful platform: engineers, product managers, evangelists, technical writers, support staff...everyone. You can’t produce something like iOS without all hands on deck at all times.

Although Apple made this book possible, Dave, Andy, Susannah, and the rest of the PragProg staff made it reality. Our editor, Jill Steinberg, has been a truly fearless and patient leader while I ran off to day jobs and other distractions. Writing a book has always been a personal goal of mine, and I am pleased to have done it so early in life. Thank you all for giving me the chance.

The biggest thanks of all, however, go to my friends and family for supporting me through this journey. My wonderful wife and son are the real reason I do anything. This indie developer gig ain’t bad, but it doesn’t come close to being a husband or a dad.

3.2 Paul Warren

I’d like to add my appreciation for the work of the wonderful people at Apple for building this amazing platform that is our daily playground. Also to Jill and the team at PragProg.com for providing a delightfully nurturing experience. And to our extraordinary community of developers who share and encourage in equal measure.

The phrase “What do you think of this?” will no doubt haunt the dreams of my beautiful wife and daughters, who showed remarkable patience with a fledgling author in the house. For that, and for filling my life with the sounds and love of an amazingly supportive family, I will be continually amazed and grateful.


Copyright © 2011, The Pragmatic Bookshelf.

Chapter 1

UI Recipes

We could easily write an entire book on UI recipes. After all, the iOS SDK has a seemingly endless library of classes and patterns that are definitely worth discussing. Ultimately we decided to focus on presenting good solutions to some simple patterns and problems—the kinds of things you find yourself doing over and over again without quite remembering how you did it the last time.

In this section we introduce recipes on view transitions, web content, touch handling, and even custom controls. These recipes are ready for you to use and might just inspire you to think about making your own code ready for reuse in your next inevitable project.

Recipe 1 Add a Basic Splash Screen Transition

Problem

A harsh transition from the default image to the live UI on startup creates a bad first impression for your users. You want the transition from your app’s startup image to your initial UI to be as smooth as possible, but you’re not sure how to go about this in the cleanest way.

Solution

The visual experience of an iOS app launching goes something like this:

User taps an app icon.

App’s default image scales onto the screen.

App’s initial UI is loaded into memory.

UI appears on-screen and replaces the default image.

If your default image is a branded banner or some other stylized picture, your users might see a harsh transition to the live UI. You want to introduce a smooth transition from the splash screen to your running application. There are plenty of ways to

Return Main Page Previous Page Next Page

®Online Book Reader