Book description
Pro iOS Table and Collection Views with Swift takes a task-oriented focus to assist you when implementing customized table views or collection views. It’s a great reference and customization cookbook at the same time, useful for beginners as well as intermediate developers. You'll learn how to create table and collection views for a variety of screen types, including the new Watch, using the Swift 2 programming language. But this book doesn't leave the Objective-C programmer behind -- you'll also find code samples for Objective-C.
If you’re an iOS app developer, chances are you’ll be using table views and now collection 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, and the possibilities are even greater now with Watch glances and a larger variety of screen sizes.
Table views and collection views are some 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.
Table of contents
- Cover
- Title
- Copyright
- Dedication
- Contents at a Glance
- Contents
- About the Author
- About the Technical Reviewers
- Acknowledgments
- Introduction
-
Chapter 1: Table Views Quick Start
- What Are Table Views?
- The Anatomy of a Table View
- Creating a Simple Table View App
- Creating the Application Skeleton
- Generating Some Data
- Creating the Table View
- Conforming to the Table View Protocols
- Wiring Up the Data Source and Delegate
- Displaying the Data
- Adding Some Interactivity
- Understanding How the App’s Objects Fit Together
- Summary
- Chapter 2: How the Table View Fits Together
- Chapter 3: Collection Views Quick Start
- Chapter 4: How The Collection View Fits Together
-
Chapter 5: Feeding Data to Your Views
- UITableView, UICollectionView, and Delegation
- Datasources
- The UITableView dataSource
- The UICollectionView dataSource
- The Thing to Bear in Mind About dataSource Methods
- Implementing the dataSource and delegate Protocols
- All About indexPaths
- The Model-View-Controller Design Pattern
- Improving the App Structure
- Summary
- Chapter 6: How the Table Cell Fits Together
- Chapter 7: Improving the Look of Cells
- Chapter 8: Creating Custom Cells with Subclasses
- Chapter 9: Improving Interaction
- Chapter 10: Using Tables for Navigation
-
Chapter 11: Indexing, Grouping, and Sorting Tables
- Using Indexed Tables
- Using Sectioned and Grouped Tables
- Creating a Simple Indexed Table
- Building Practical Sectioned Tables
- Creating the Data for a Table with Sections and Indexes
- Creating the All-Singing, All-Dancing Table
- Creating Table and Section Header and Footer Views
- Table Headers and Footers
- Moving the Table Programmatically
- Finding the Current Scroll Position in the Table
- Summary
-
Chapter 12: Selecting and Editing Content
- A Recap of the Model-View-Controller Pattern
- Why the Model-View-Controller Pattern Is Important
- Cell Selection in TableViews
- Selection Dos and Don’ts
- Responding to Selections with More Detail
- Design Patterns and UITableViews
- Custom Row Actions
- Inserting and Deleting Rows
- Selection in UICollectionViews
- Rearranging UICollectionViews
- Summary
- Chapter 13: Static Tables
- Chapter 14: Tables in WatchKit
- Chapter 15: Collection View Flow Layouts
-
Chapter 16: Collection View Custom Layouts
-
About Custom Layouts
- When to Create a Custom Collection View Layout
- Creating a Custom Layout Subclass
- Deciding When to Calculate Attributes
- What the Custom Layout Does
- What Are Layout Attributes?
- The Four Key Functions to Implement
- prepareLayout
- collectionViewContentSize
- layoutAttributesForElementsInRect
- layoutAttributesForItemAtIndexPath
- Supplementary and Decoration View Attributes
- This Chapter’s Project
- The Initial Project
- Updating the Project
- Summary
-
About Custom Layouts
- Chapter 17: Animated and Interactive Collection Views
- Index
Product information
- Title: Pro iOS Table Views and Collection Views: Using Swift 2
- Author(s):
- Release date: December 2015
- Publisher(s): Apress
- ISBN: 9781484212424
You might also like
book
Swift: Developing iOS Applications
Unleash the power of Swift and discover the skills required to build incredible robust iOS applications …
book
Swift Development for the Apple Watch
Apple Watch is the sort of science-fiction gadget that people used to dream about as kids. …
book
Pro Objective-C Design Patterns for iOS
It's time to capitalize on your mastery of Cocoa with Pro Objective-C Design Patterns for iOS. …
book
App Development Using iOS iCloud: Incorporating CloudKit with Swift in Xcode
Create a professional looking app from start to finish that takes advantage of iCloud technology. Rather …