■ INTRODUCTION
xv
Chapter 9, “Creating Custom Cells with Subclasses,” takes customizing cells to the next
level. You’ll learn how to use custom UITableViewCell subclasses to gain detailed control over
cells’ appearance.
In addition to changing the look and feel of cells, you can make them truly interactive by
embedding controls such as buttons and sliders. Chapter 10, “Improving the Cell’s Interaction,”
presents how to do this, as well as building cool table features such as slide-to-reveal, pull-to-
refresh, and search.
Finally, in Chapter 11, “Table Views on the iPad,” you’ll look at the iPad’s split-view
controller, which provides a flexible two-pane interface familiar from apps such as Mail.
The Style of This Book
I’ve tried to bridge the gap between two styles of book—the in-depth treatment of every last little
detail, and the cookbook of specific point solutions. Both have their place, but sometimes I find
that descriptions of very detailed, elegant solutions with lots of features can obscure the detail of
the problem I’m trying to solve. Equally, sometimes cookbook solutions are too specific and don’t
easily lend themselves to adapting to my specific situation.
In the code examples that follow, I’ve tried to balance the two styles. The visual polish and
extraneous functions are kept to a minimum, which hopefully results in examples that illustrate
how to build a solution while also acting as a building block for your own code.
The Book’s Source Code
You can download the source code for each chapter’s examples from the Apress site or from
GitHub at http://github.com/timd/Pro-iOS-TableViews.
Although that’s the quickest way to get up and running, I encourage you to take the extra
time to key in the code yourself as you go along. With Xcode’s code completion, it doesn’t take
that long, and code that has flowed through your eyes and brain, and then out to your fingers, is
much more likely to sink in and make sense.
Where to Find Out More
Beyond the pages of this book, there’s a wealth of other information available online (not to
mention the great range of other Apress titles):
■ For a general overview, Apple’s “Table View Programming Guide for iOS” is a
detailed guide that covers most of the topics in this book. This is available online at
http://developer.apple.com/library/ios/#documentation/userexperience/concep
tual/TableView_iPhone/AboutTableViewsiPhone/AboutTableViewsiPhone.html, or in
Xcode’s documentation.
■ Apple’s iOS Developer Library has full documentation for all Cocoa Touch
libraries. It tends not to include examples in the documentation itself, but the
Library is the one-stop shop for a detailed reference for each class, protocol, and
library. Again, this is available online, at
http://developer.apple.com/library/ios/navigation/ or in Xcode’s
documentation library.
■ Online forums are a fantastic resource. Sites such as Stack Overflow
(www.stackoverflow.com) are the place to go for practical advice. Chances are, a
number of people will have met and overcome the same problem that you’re
experiencing, and the answer will be there. Stack Overflow’s customs and practices
can be a little daunting at first, but it’s worth persevering. There are no stupid
questions, after all, just questions that haven’t been answered yet.
- 1
- 2
前往页