Skip to content

Instantly share code, notes, and snippets.

@b3ll
Created February 21, 2017 09:19
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save b3ll/2f269cab594b654be16eedfa9c0be222 to your computer and use it in GitHub Desktop.
Save b3ll/2f269cab594b654be16eedfa9c0be222 to your computer and use it in GitHub Desktop.
UIActivityViewController is crazy slow :(
// Preheat the UIActivityViewController because it's crazy slow.
let activityViewController = UIActivityViewController(activityItems: [ UIImage(named: "Halo.jpg")! ], applicationActivities: nil)
activityViewController.view.alpha = 0.0
let fakeViewController = UIViewController()
fakeViewController.present(activityViewController, animated: false) {
activityViewController.dismiss(animated: false, completion: nil)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment