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.
Out of Print
This book is currently out of print.
About this Book
- 224 pages
- 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 and Extracts
- 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
Comments and Reviews
—Mike Clark Founder Clarkware
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.
—Marcus S. Zarra Owner Zarra Studios LLC
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.
—Michael Hay Master developer Black Pixel 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.
—Justin Williams Crew chief Second Gear
“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.
—Brent Simmons Developer NetNewsWire
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!