I share some contents using the following code
var textToShare = "Test"
let activityVC = UIActivityViewController(activityItems: [textToShare], applicationActivities: nil)
activityVC.excludedActivityTypes = [UIActivityTypePrint, UIActivityTypeCopyToPasteboard, UIActivityTypeAssignToContact]
presentViewController(activityVC, animated: true, completion: nil)
But when I press the cancel button or when the content is shared successfully, the App shows a blank screen.
How to fix this issue ?
UPDATE:
The blank screen just appears when I select mail or sms apps for the sharing target, For Telegram, Twitter and Facebook it is working perfect.
I commented all the code inside lifecycle methods, Still same issue.
override func viewDidAppear(animated: Bool)
{
    //setControlsAreHidden(true)
}
override func viewWillAppear(animated: Bool)
{
    //if dataAddedToView
    //{
    //     activityIndicator?.removeFromSuperview()
    //}
}
override func viewWillDisappear(animated: Bool)
{
    //setControlsAreHidden(false)
}
 
     
     
     
     
     
     
    