Quantcast
Channel: Active questions tagged crash - Stack Overflow
Viewing all articles
Browse latest Browse all 7191

Is there any reason for this to crash?

$
0
0

I am receiving crashes from Apple like this:

enter image description here

The crash report is so bad, as expected for Xcode, that I have to guess where in my code this is coming from.

The crash talks about popover. The only part of my code where I have popover is this `share" stuff, when I have these "delete" and "share" trailing swipe action on a table view that shows files from the documents folder.

 override func tableView(_ tableView: UITableView, trailingSwipeActionsConfigurationForRowAt indexPath: IndexPath) -> UISwipeActionsConfiguration? {    let delete = ... bla bla bla    let share = UIContextualAction(style: .normal, title: "") {[weak self] (contextualAction, view, boolValue) in      let oneFile = self?.files![indexPath.section]![indexPath.row]      let activityViewController = UIActivityViewController(        activityItems: ["Check out these files.", (oneFile?.url)! as URL],        applicationActivities: nil      )      activityViewController.popoverPresentationController?.sourceView = self?.view      self?.present(activityViewController, animated: true, completion: {[weak self] in        self?.tableView.setEditing(false, animated: true)      })    }    let swipeActions = UISwipeActionsConfiguration(actions: [delete,share])    swipeActions.performsFirstActionWithFullSwipe = true    return swipeActions}

Is there anything you guys see here that can be causing the crash?

The reports show this is crashing on the iPad but I test and it is working fine.


Viewing all articles
Browse latest Browse all 7191

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>