Reputation: 4506
I had two people discuss two different approaches with me on how to add assets such as images to a project in Swift.
Now I'm confused - when I drag and drop an image (let's say from my Downloads folder) doesn't Xcode copy the image locally into its own private location? Once I drag it into XCAssets, does it need that source location anymore? I thought maybe approach #1 would end up forcing Xcode to store duplicate images/assets and take up more size on the app.
What is the "correct" approach to adding assets?
Thanks!
Upvotes: 0
Views: 793
Reputation: 7588
Both actually can work (drag and drop/use asset folder). But the latest method introduced by Apple by xcasset folder. XCAsset folder is superior in the way that you can see a list of assets nicely one by one, even you have multiple sizes on it (.png @2x.png @3x.png etc). Easier to manage and see which size you are missing etc.
Upvotes: 0