Now, we need to create our PhotoFilterViewController:
- Right-click the Photo Filter folder and select New File.
- Inside the Choose a template for your new file screen, select iOS at the top, and then Cocoa Touch Class. Then, hit Next.
- In the options screen that appears, add the following:
New file:
-
- Class: PhotoFilterViewController
- Subclass: UIViewController
- Also create XIB: Unchecked
- Language: Swift
- Click Next, and then Create.
When the file opens, delete everything after the viewDidLoad() method.
- Then, add the following:
class PhotoFilterViewController: UIViewController { var image: UIImage? var thumbnail: UIImage? let manager = FilterManager() var selectedRestaurantID:Int? var data:[FilterItem] ...