Sinan Samet
Sinan Samet

Reputation: 6752

Can't select folder from assets

I made a folder in my image assets in xcode called weather-large and I have a file in it that I want to access called clouds.png

So I try to access it this way:

weatherImageView.image = UIImage(contentsOfFile: "weather-large/clouds")

And also tried it this way:

weatherImageView.image = UIImage(named: "weather-large/clouds")

But it both doesn't work while I can access it in the root. What am I doing wrong?

Upvotes: 0

Views: 64

Answers (1)

AlexZd
AlexZd

Reputation: 2152

This folders just to group assets. Try:

weatherImageView.image = UIImage(named: "clouds")

Upvotes: 2

Related Questions