Created
February 21, 2017 09:19
-
-
Save b3ll/2f269cab594b654be16eedfa9c0be222 to your computer and use it in GitHub Desktop.
UIActivityViewController is crazy slow :(
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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