There are many examples on how to use imageWithContentsOfFile in object-c, but how do I use it in Swift. imageView.image = UIImage(imageWithContentsOfFile: imageName)
returns Argument labels '(imageWithContentsOfFile:)' do not match any available overloads
while if I write: imageView.image = UIImage(contentsOfFile:imageName)
It doesn't display the image.
(I have all images stores in Media.xcassets) I am displaying a lot of images so using UIImage(named:imageName) isn't a viable option. How can I get the functionality of contentsOfFile in swift?