 // Copyright © 2020 Itty Bitty Apps. All rights reserved.
 
 import UIKit
+import PhotosUI
 
 final class PickerTableViewController: UITableViewController {
   private enum Section: CaseIterable {
     case datePicker
-    case colorPicker
+    case iOS14Picker
     case other
   }
 
   private let sections: [CountrySection] = RevertItems.capitalCities.data()
   private let datePickerCellIdentifier = "DatePickerCell"
   private let tableViewCellIdentifier = "UITableViewCell"
+  private let tableViewCelllabels: [(title: String, subtitle: String)] = [
+    (title: "Color Picker", subtitle: "Tap here to launch the new color picker from iOS 14"),
+    (title: "Photo Picker", subtitle: "Tap here to launch the new photo picker from iOS 14"),
+  ]
 
   private var pickerSections: [Section] {
     if #available(iOS 14.0, *) {
-      return [.datePicker, .colorPicker, .other]
+      return [.datePicker, .iOS14Picker, .other]
     }
     return [.datePicker, .other]
   }
 
-  @available(iOS 14, *)
+  @available(iOS 14.0, *)
   var datePickerStyles: [UIDatePickerStyle] { [.compact, .inline, .wheels] }
 
   override func viewDidLoad() {

  }

  override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
    guard self.pickerSections[indexPath.section] == .colorPicker else {
      return
    }

    if #available(iOS 14.0, *) {
      let colorPickerController = UIColorPickerViewController()

      self.navigationController?.present(colorPickerController, animated: true, completion: nil)
    }

    self.tableView.deselectRow(at: indexPath, animated: true)

      let cell = tableView.dequeueReusableCell(withIdentifier: identifier)!

      return cell
    case .iOS14Picker:
      let cell = UITableViewCell(style: .subtitle, reuseIdentifier: self.tableViewCellIdentifier)

      cell.textLabel?.text = tableViewCelllabels[indexPath.row].title
      cell.detailTextLabel?.text = tableViewCelllabels[indexPath.row].subtitle

      if #available(iOS 14.0, *) {
        cell.detailTextLabel?.textColor = .secondaryLabel
