Skip to content

Instantly share code, notes, and snippets.

@ArchieR7
Created October 5, 2017 11:27
Show Gist options
  • Save ArchieR7/7321eb4db8ad550aaeaff1d1d6760109 to your computer and use it in GitHub Desktop.
Save ArchieR7/7321eb4db8ad550aaeaff1d1d6760109 to your computer and use it in GitHub Desktop.
if let url = Bundle.main.url(forResource: ImageName, withExtension: ".png"),
let data = try? Data(contentsOf: url,
options: Data.ReadingOptions.uncached) {
let image = UIImage(data: data)
imageView.image = image
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment