O'Reilly logo

Swift 2 By Example by Giordano Scalzo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required