Pro iOS Table Views for iPhone, iPad, and iPod Touch

Book description

If you're an iOS app developer, chances are you'll be using table views in your development projects. Table views are the bread and butter of iOS apps. With them, you can create everything from the simplest of lists to fully tricked-out user interfaces.

Table views are one of the most complex components found in UIKit. While using them for boring standard user interfaces is quite simple, customizing them can become really challenging.

Pro iOS Table Views takes a task-oriented focus to assist you when implementing customized table views. Although it delves deeply into the Table View API, you can always decide in which level of detail you want to dive in. It's aimed to be a great reference and customization cookbook at the same time, useful for beginners as well as intermediate developers.

  • Covers the entire Table View API in depth

  • Covers customization and performance topics in depth

  • Task-oriented reference with multiple levels of detail

What you'll learn

  • The anatomy of tables and cells

  • The design patterns that power the table view

  • How to create and configure table views

  • How to customize every last little detail of the table view

  • How to use table views on the iPad

  • Advanced tips and tricks for performance and killer user interfaces

  • The latest updates in iOS 5 and how to exploit them

Who this book is for

The book is targeted at iOS developers who need to customize Table Views. The information is divided into several layers of detail. While the book covers complex customization topics and user interaction techniques, it provides the fundamental basics needed for customization. Both beginners and intermediate developers will find great value in this book as a helpful reference, at hand to quickly refresh their knowledge at any given time.

Table of contents

  1. Title
  2. Dedication
  3. Contents at a Glance
  4. Contents
  5. About the Author
  6. About the Technical Reviewer
  7. Acknowledgments
  8. Introduction
    1. What This Book Covers
    2. The Style of This Book
    3. The Book's Source Code
    4. Where to Find Out More
  9. Chapter 1: Table Views from the Ground Up
    1. What Are Table Views?
    2. The Anatomy of a Table View
    3. Creating a Simple Table View App
    4. Creating the Application Skeleton
    5. Generating Some Data
    6. Creating the Table View
    7. Conforming to the Table View Protocols
    8. Wiring Up the Data Source and Delegate
    9. Displaying the Data
    10. Adding Some Interactivity
    11. Understanding How the App's Objects Fit Together
    12. Summary
  10. Chapter 2: How the Table Fits Together
    1. Understanding Table Views
    2. Working with the UITableView Family
    3. Choosing the Type of Table View
    4. Setting TableView Dimensions
    5. Controlling the Background of a UITableView
    6. What UITableView Inherits from UIScrollView
    7. Creating UITableViews
    8. Summary
  11. Chapter 3: Feeding Data to Your Tables
    1. UITableView and Delegation
    2. Data Sources
    3. All About indexPaths
    4. The Model-View-Controller Design Pattern
    5. Summary
  12. Chapter 4: How the Cell Fits Together
    1. Understanding the Anatomy of a UITableViewCell
    2. Working with Standard Cell Types
    3. Configuring the Default Cell’s Content
    4. Working with Accessory Views
    5. Creating and Reusing Cells
    6. Summary
  13. Chapter 5: Using Tables for Navigation
    1. The Navigation Controller Interface Pattern
    2. Introducing the UINavigationController
    3. Creating a Navigation Controller App
    4. Summary
  14. Chapter 6: Indexing, Grouping, and Sorting
    1. Using Indexed Tables
    2. Using Sectioned and Grouped Tables
    3. Creating a Simple Indexed Table
    4. Building Practical Sectioned Tables
    5. Creating the Data for a Table with Sections and Indexes
    6. Creating the All-Singing, All-Dancing Table
    7. Creating Table and Section Header and Footer Views
    8. Moving the Table Programmatically
    9. Finding the Current Scroll Position in the Table
    10. Summary
  15. Chapter 7: Selecting and Editing Table Content
    1. A Recap of the Model-View-Controller Pattern
    2. Why the Model-View-Controller Pattern Is Important
    3. Cell Selection
    4. Selection Dos and Don'ts
    5. Responding to Selections with More Detail
    6. Design Patterns and UITableViews
    7. Inserting and Deleting Rows
    8. Summary
  16. Chapter 8: Improving the Look of Cells
    1. Customizing Cells
    2. Adding Subviews to the Cell's contentView
    3. Creating Custom Cells Visually Using Interface Builder
    4. Handling Cell Resizing
    5. Summary
  17. Chapter 9: Creating Custom Cells with Subclasses
    1. Why Create a Custom Cell Subclass?
    2. Designing Your Cell
    3. Creating the Class for the Custom Cell
    4. Building the Cell in Interface Builder
    5. Handling Selection in Custom Cells
    6. Drawing Cells in Code with layoutSubviews
    7. Building the Cell in Code with the contentView
    8. Debugging Layers
    9. Summary
  18. Chapter 10: Improving the Cell’s Interaction
    1. Embedding Custom Controls into Cells
    2. Adding Gestures to Cells
    3. Swiping in Cells
    4. Adding Pull-to-Refresh to Table Views
    5. Searching in Tables
    6. Happy, Healthy Tables
    7. Summary
  19. Chapter 11: Table Views on iPad
    1. The UISplitViewController
    2. Creating a UISplitViewController App
    3. Summary
  20. Index

Product information

  • Title: Pro iOS Table Views for iPhone, iPad, and iPod Touch
  • Author(s):
  • Release date: March 2012
  • Publisher(s): Apress
  • ISBN: 9781430233480