From 0c79db4482b73240931ca74a4383c128a452f559 Mon Sep 17 00:00:00 2001 From: Riley Testut Date: Mon, 20 May 2019 21:40:04 +0200 Subject: [PATCH] Displays app details when selecting app in MyAppsViewControllers --- AltStore/Base.lproj/Main.storyboard | 6 ++++++ AltStore/My Apps/MyAppsViewController.swift | 13 +++++++++++++ 2 files changed, 19 insertions(+) diff --git a/AltStore/Base.lproj/Main.storyboard b/AltStore/Base.lproj/Main.storyboard index 6ded4674..58bf0139 100644 --- a/AltStore/Base.lproj/Main.storyboard +++ b/AltStore/Base.lproj/Main.storyboard @@ -59,6 +59,12 @@ + + + + + + diff --git a/AltStore/My Apps/MyAppsViewController.swift b/AltStore/My Apps/MyAppsViewController.swift index 886d3dc4..82453178 100644 --- a/AltStore/My Apps/MyAppsViewController.swift +++ b/AltStore/My Apps/MyAppsViewController.swift @@ -26,6 +26,19 @@ class MyAppsViewController: UITableViewController self.tableView.dataSource = self.dataSource } + + 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 installedApp = self.dataSource.item(at: indexPath) + guard let app = installedApp.app else { return } + + let appDetailViewController = segue.destination as! AppDetailViewController + appDetailViewController.app = app + } } private extension MyAppsViewController