Grouping UITableView cells into sections - Swift Generics by example

This example shows how to group cells UITableView into sections. As an example we’ll group the news stories from the UITableViewController tutorial example project by month:

Starting with a plain UITableViewController, we’ll use the Dictionary(grouping:by:) API that was added in Xcode 10 to group the rows into sections. Then the code is refactored to a generic type - if you’ve not written generic types before, this will serve as an introduction on how to create generic types for abstracting common tasks while writing UIKit code.