The ASAP e-commerce store

In this section, we'll implement the product, wrapping the connection with the server with a protocol so that we can implement the app using a fake local storage for this information.

The e-commerce product list

The list of the products stating the requirements for the app is simple: a grid with two columns is required, which we can implement using UICollectionView.

First of all, let's change the controller in the Storyboard from a simple UIViewController to UICollectionviewController, embed it into UINavigationController, add a UICollectionViewCell prototype, and change the parent class accordingly in the Swift file.

The e-commerce product list

Although ...

Get Swift 2 By Example now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.