我UIActivityViewController
用来显示选项。然后选择 Twitter 或 Facebook,出现iOS share sheet。
有没有办法手动关闭共享表?我看不到任何代表。
这是我的代码:
let arrObjectsToShare = [self, finalTextToShare, secondActivityItem]
let activityVC = UIActivityViewController(activityItems: arrObjectsToShare, applicationActivities: nil)
activityVC.excludedActivityTypes = [
UIActivityTypePostToWeibo,....etc]
activityVC.completionWithItemsHandler = {(activityType: String?, bool: Bool, dictType: [AnyObject]?, error: NSError?) -> Void in
print(activityType)
}
self.presentViewController(activityVC, animated: true, completion: nil)
提示: 当 iOS 共享表到屏幕时,键盘也会显示。至少我试图关闭键盘,但没办法:
self.view.endEditing(true)
真的需要帮助。谢谢