From 9b7c0387cfb563f124410eea023ee8db8eeb97e5 Mon Sep 17 00:00:00 2001 From: nythepegasus Date: Mon, 6 May 2024 20:21:15 -0400 Subject: [PATCH] Fix Error Log showing UIAlertController on iOS 14+ --- .../Settings/Error Log/ErrorLogViewController.swift | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/AltStore/Settings/Error Log/ErrorLogViewController.swift b/AltStore/Settings/Error Log/ErrorLogViewController.swift index 1fb297dc..a6acb062 100644 --- a/AltStore/Settings/Error Log/ErrorLogViewController.swift +++ b/AltStore/Settings/Error Log/ErrorLogViewController.swift @@ -111,6 +111,7 @@ private extension ErrorLogViewController cell.menuButton.menu = menu cell.menuButton.showsMenuAsPrimaryAction = self.isScrolling ? false : true + cell.selectionStyle = .none } // Include errorDescriptionTextView's text in cell summary. @@ -266,6 +267,7 @@ extension ErrorLogViewController { override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { + guard #unavailable(iOS 14) else { return } let loggedError = self.dataSource.item(at: indexPath) let alertController = UIAlertController(title: nil, message: nil, preferredStyle: .actionSheet) @@ -364,14 +366,7 @@ extension ErrorLogViewController for case let cell as ErrorLogTableViewCell in self.tableView.visibleCells { - if self.isScrolling - { - cell.menuButton.showsMenuAsPrimaryAction = false - } - else - { - cell.menuButton.showsMenuAsPrimaryAction = true - } + cell.menuButton.showsMenuAsPrimaryAction = self.isScrolling ? false : true } } }