Supports viewing full screen app screenshots from AppViewController

[Missed] Uses layout config for PreviewAppScreenshots
This commit is contained in:
Riley Testut
2023-10-12 15:19:18 -05:00
parent 50515382d0
commit 20417f39ba
4 changed files with 192 additions and 1 deletions

View File

@@ -129,6 +129,21 @@ private extension AppScreenshotsViewController
}
}
extension AppScreenshotsViewController
{
override func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath)
{
let screenshot = self.dataSource.item(at: indexPath)
let previewViewController = PreviewAppScreenshotsViewController(app: self.app)
previewViewController.currentScreenshot = screenshot
let navigationController = UINavigationController(rootViewController: previewViewController)
navigationController.modalPresentationStyle = .fullScreen
self.present(navigationController, animated: true)
}
}
@available(iOS 17, *)
#Preview(traits: .portrait) {
DatabaseManager.shared.startForPreview()