@IBAction func shareButtonPushed(sender: UIBarButtonItem) {
let activityViewController = UIActivityViewController(activityItems: [self.getShareMessage()], applicationActivities: nil)
activityViewController.excludedActivityTypes = [
UIActivityTypePrint,
UIActivityTypeAssignToContact
]
dispatch_async(dispatch_get_main_queue()) {
self.presentViewController(activityViewController, animated: true, completion: nil)
}
}
I have a button that present UIActivityViewController in UIViewController with table. Every table cell has a segue to another view controller.
The problem when we click on cell and button at the same time, cell show new ViewController and then UIActivityViewController appears. How to check if it is not current view controller then not show.
This How to tell if UIViewController's view is visible didn't help.