Reputation: 11
I have a images from the Images.xcassets folder and I want to load them into a UIImage programmatically using swift. The images are for a list so image 1 corresponds to list item 1.
How can I do this?
Please give me some code examples!
Upvotes: 0
Views: 2158
Reputation: 2495
let image = UIImage(named: "nameOfImageInXCAssets")
I'm giving you the benefit of the doubt on this one, but this is a very straight forward read the manual case.
There's even a section called "Loading and Caching Images"
Upvotes: 2