Skip to Content
Programming iOS 10
book

Programming iOS 10

by Matt Neuburg
November 2016
Beginner to intermediate content levelBeginner to intermediate
800 pages
30h 12m
English
O'Reilly Media, Inc.
Content preview from Programming iOS 10

Chapter 8. Table Views and Collection Views

I’m gonna ask you the three big questions. — Go ahead. — Who made you? — You did. — Who owns the biggest piece of you? — You do. — What would happen if I dropped you? — I’d go right down the drain.

Dialogue by Garson Kanin and Ruth Gordon, Pat and Mike

A table view (UITableView) is a vertically scrolling UIScrollView (Chapter 7) containing a single column of rectangular cells (UITableViewCell, a UIView subclass). It is a keystone of Apple’s strategy for making the small iPhone screen useful and powerful, and has three main purposes:

Presentation of information

The cells typically contain text, which the user can read. The cells are usually quite small, in order to maximize the quantity appearing on the screen at once, so this text is often condensed, truncated, or simplified.

Selection

A table view can provide the user with a column of choices. The user chooses by tapping a cell, which selects the cell; the app responds appropriately to that choice.

Navigation

The appropriate response to the user’s choosing a cell is often navigation to another interface. This might be done, for example, through a presented view controller or a navigation interface (Chapter 6). An extremely common configuration is a master–detail interface, where the master view is a table view within a navigation interface: the user taps a table view cell to navigate to the details about that cell. This is one reason why truncation of text in a table view cell ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Programming iOS 12

Programming iOS 12

Matt Neuburg
Programming iOS 11

Programming iOS 11

Matt Neuburg
Programming iOS 13

Programming iOS 13

Matt Neuburg

Publisher Resources

ISBN: 9781491970157Errata Page