Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's difference between Assets.xcassets and images.xcassets?

When I new a xcode project, there was a image folder by defalut, I wanna to know that is there any difference between them? Is Assets.xcassets newer?

like image 367
huangxinyu Avatar asked Jul 02 '17 17:07

huangxinyu


People also ask

What is assets Xcassets?

xcassets Catalog in Xcode. An asset catalog, simply put, is a single folder in Xcode that you use to organize your app's images, icons, colors, and more. Instead of adding individual images to Xcode's file organizer, you add assets neatly organized in a single catalog.

What is images Xcassets?

The images. xcassets catalog is the default asset, used to manage the required app icons and launch images. Let's start by configuring the app icons. Select “images. xcassets” from the project navigator.

What is asset catalog in Swift?

Asset catalogs help you quickly organize and manage your app's resources. In an asset catalog, each asset set represents one resource — like an image, color, or data file — that your app loads at runtime.

How do I add an asset in Xcode?

In the Project navigator, select an asset catalog: a file with a . xcassets file extension. Drag an image from the Finder to the outline view. A new image set appears in the outline view, and the image asset appears in a well in the detail area.


2 Answers

What is Asset?

Asset catalogs to organize and manage the different asset types and image resolutions used by your app’s user interface.

You can have multiple asset catalogs in your project and within each catalog, multiple sets of assets. In addition, you can organize sets into folders.The common types of sets you can add to a catalog are image, data, and texture sets.

Now you understand that image asset is one of the asset catalog.

It will automatically created by Xcode when creating new projects.

Common use of Asset catalog :

In particular, use asset catalogs to manage images that are required to launch your app on a device and submit your app to the App Store.

As above statements from apple there are multiple asset types are available.You can create catalog for each type if you want.

Asset types

enter image description here

You can get more info from help.apple.com

like image 69
Dharma Avatar answered Sep 21 '22 05:09

Dharma


Not really sure but I think since Xcode 7 you have this new Assets.xcassets catalog to store several types of resources, not just images as you can have sounds, images, fonts and movies in your project.

like image 27
Miguel Rojas Cortés Avatar answered Sep 20 '22 05:09

Miguel Rojas Cortés