Reputation: 4600
I've spent hours trying to simply gain access to image data in my Swift Playground. I've followed many tutorials that recommend adding a resource folder as a sibling dir in the dir. your playground is in. Or to drag images into the Resources folder in the playground Navigator. Nothing has worked. What do I have to do to load an image view in playground?
Upvotes: 4
Views: 5343
Reputation: 626
I solved this problem on my side when I
import PlaygroundSupport
let image = UIImage(named: "image.jpg")
Xcode 12 Preview
Upvotes: 10