small medium large xlarge

iOS Recipes: Tips and Tricks for Awesome iPhone and iPad Apps


Cover image for iOS Recipes

iOS Recipes

Tips and Tricks for Awesome iPhone and iPad Apps


Take your iPhone and iPad apps to the next level. You’ve seen cool features and tricks in other apps, but haven’t had the time to really look into how they’re done. We’ve got the answers for you. This book walks you through clean, reusable solutions to a wide variety of problems and patterns common to iOS development with Cocoa Touch and Objective-C. With these recipes in your arsenal, your next apps will be more polished and more maintainable than ever.

Written for and tested on iOS 4 and Xcode 4.

Customer Reviews

If you use just one of these recipes in your app, that alone is worth the price of this book.  I quickly lost count of the recipes that I found immediately useful. If you’re getting paid to write iOS apps, or you just value your time, you’d be crazy not to have this book within arm’s reach at all times.

- Mike Clark

Founder, Clarkware

I highly recommend this book. So many of these tips and tricks, aka recipes, get lost or become difficult to find. I would rather pull a book off the shelf (or iBooks) and look for that snippet of code I knew I saw in there rather than search the Internet in hope that the site I saw it on still has it. This book will definitely be in that collection.

- Marcus S. Zarra

Owner, Zarra Studios LLC

This is a great book for both beginners and experienced developers.  It’s packed with useful up-to-date examples showing how to add professional-grade features to your projects, with great explanations and a focus on the code.

- Michael Hay

Master developer, Black Pixel LLC

“iOS Recipes” is the book that commonly answers the "How did they do that?’’ question.  It is an essential book for anyone who wants to sprinkle little bits of awesome in their app.

- Justin Williams

Crew chief, Second Gear

If I had to pick just one person to learn from, to learn the best ways to do things in iOS, it would be Matt Drance. And the book doesn’t disappoint. I made use of a couple recipes immediately, and I look forward to using more of them, especially Paul’s fun graphics and animation recipes!

- Brent Simmons

Developer, NetNewsWire

See All Reviews

About this Title

Pages: 224
Published: 2011-07-07
Release: P1.0 (2011-07-05)
ISBN: 978-1-93435-674-6

iOS Recipes begins with a tour of UIKit. Former Apple Evangelist Matt Drance and expert graphical-systems programmer Paul Warren show you how to write splash screens and embedded web browsers that are easily dropped into any project. You’ll explore techniques for building complex table views without losing yourself in a sea of code, and see how to add some unique visual touches to any table—even the ones you’ve already built.

Next you’ll explore Quartz and Core Animation, and you’ll walk through a number of fills, transforms, and animations that will breathe life into any app or game. You’ll also learn about gestures, transitions, and custom controls to take your user interactions to the next level.

You’ll tackle networking with a few basic techniques to prevent unnecessary repetition in your codebases, and address some more complex problems like uploading large files to a web server. Finally, you’ll see some simple disciplines and ideas that will make architecting, debugging, maintaining, and ultimately shipping your application easier every single time.

By the end of this book, you’ll have expanded your iPhone and iPad development knowledge and be well on your way to building elegant solutions that are ready for whatever project you take on next.

Contents & Extracts

Full Table of Contents


  • Basic UI Recipes
    • Add a Basic Splash Screen Transition
    • Stylize Your Splash Screen Transition
    • Animate a Custom Notification View
    • Create Reusable Toggle Buttons
    • Form Rounded Views with Textured Colors
    • Put Together a Reusable Web View
    • Customize Sliders and Progress Views
    • Shape a Custom Gesture Recognizer
    • Create Self-contained Alert Views
    • Make a Label for Attributed Strings
    • Scroll an Infinite Wall of Album Art excerpt
    • Play Tracks from a Wall of Album Art
    • Have Fun with Autoscrolling Text Views
    • Create a Custom Number Control**
  • Table and Scroll View Recipes
    • Simplify Table Cell Production excerpt
    • Use Smart Table Cells in a Nib
    • Locate Table Cell Subviews
    • Organize Complex Table Views
    • Produce Two-Tone Table Views
    • Add Border Shadows for Table Views
    • Place Static Content in a Zoomable Scroll View
    • Build a Carousel Paging Scroll View
  • Graphics Recipes
    • Draw Gradient Filled Bezier Paths
    • Create Dynamic Images With Multiple Animations
    • Make Composited and Transformed Views
    • Animate a Gradient Layer
    • Reshape Shadows
    • Display Animated Views
    • Construct a Simple Emitter
    • Curl the Page to a New View
  • Networking Recipes
    • Tame the Network Activity Indicator excerpt
    • Simplify Web Service Connections
    • Format a Simple HTTP POST
    • Upload Files Over HTTP
  • Runtime Recipes
    • Leverage Modern Objective-C Class Design
    • Produce Intelligent Debug Output
    • Design Smarter User Defaults Access
    • Scan and Traverse View Hierarchies
    • Initialize a Basic Data Model
    • Store Data in a Category


Matt Drance founded Bookhouse Software, an iOS development and consulting company, after an eight-year career at Apple. He also trains new iOS developers for the Pragmatic Studio, and shares his thoughts on the industry at Apple Outsider ( When he isn’t coding, writing, teaching, or being a stay-at-home dad, Matt snowboards and races cars in Northern California.

Paul Warren fell in love with computer graphics, programming on his Commodore 64, in the early 80s. After 20 years of corporate programming in assembler, he got back to his first love: working with fun graphical systems. Paul’s iOS development and consulting company, Primitive Dog, specializes in 2D animation and custom controls. Two young daughters are enough to take up any time not spent making things flip, spin, and fly across his screen.