Adds basic AppDetailViewController implementation

This commit is contained in:
Riley Testut
2019-05-09 17:21:55 -07:00
parent f4a3a09cba
commit 41310a852f
16 changed files with 462 additions and 0 deletions

View File

@@ -22,6 +22,18 @@ class AppsViewController: UITableViewController
// Hide trailing row separators.
self.tableView.tableFooterView = UIView()
}
override func prepare(for segue: UIStoryboardSegue, sender: Any?)
{
guard segue.identifier == "showAppDetail" else { return }
guard let cell = sender as? UITableViewCell, let indexPath = self.tableView.indexPath(for: cell) else { return }
let app = self.dataSource.item(at: indexPath)
let appDetailViewController = segue.destination as! AppDetailViewController
appDetailViewController.app = app
}
}
private extension AppsViewController