我正在尝试实现“保存图像到相册”功能,然后返回到当前的视图控制器,但在新的 iOS 13 上,它会关闭当前的视图控制器并返回到前一个呈现它的视图控制器:
PHPhotoLibrary.requestAuthorization({(_ status: PHAuthorizationStatus) -> Void in })
let shareItems: Array = [newImg,"Hello"] as [Any]
let activityController = UIActivityViewController(activityItems: shareItems, applicationActivities: nil)
if UIDevice.current.userInterfaceIdiom == .pad {
activityController.popoverPresentationController?.sourceView = saveButton
}
present(activityController, animated: true)