The checkout scene has a layout similar to the first one. The difference is that in the table view, we will show products in the shopping cart, and it will allow the user to change the current currency.
Firstly, add a new Swift file to you project, and call it CheckoutViewController.swift
. Here, we just need to create a class to let the storyboard know which class the second scene belongs to. Go ahead and import UIKit and the ReactiveCocoa framework. After this, create a class that inherits from UIViewController
and implements UITableViewDataSource
, as demonstrated here:
import UIKit import ReactiveCocoa class CheckoutViewController: UIViewController,UITableViewDataSource { }
Return to the storyboard, and add a new View Controller to it. Select the new View Controller, and change its Class to CheckoutViewController
by going to Identity Inspector
using command + Option + 3 and updating the Class field, as demonstrated here:
You need...