Fixes Error Log showing UIAlertController on iOS 14 or later

A context menu should appear instead on iOS 14 or later.
This commit is contained in:
Riley Testut
2022-10-26 18:12:18 -05:00
parent 4ef94d22e4
commit fede5b29cb

View File

@@ -122,6 +122,8 @@ private extension ErrorLogViewController
{
cell.menuButton.showsMenuAsPrimaryAction = true
}
cell.selectionStyle = .none
}
// Include errorDescriptionTextView's text in cell summary.
@@ -269,6 +271,8 @@ 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)