Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
315 views
in Technique[技术] by (71.8m points)

xcode5 - Use of xcassets

Is .xcassets resource only for app icons and launch images or for our own image assets also? I do know that we can add our images to the .xcassets file, but is it good practice to do so?

question from:https://stackoverflow.com/questions/19441935/use-of-xcassets

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Use of xcassets is the new standard as of Xcode 5 and iOS 7. Import images by clicking on the blue folder called "Images.xcassets" then click on the small "+" plus sign at the bottom of the window that appears. Now choose "Import" to put images in there.

This is also the new location of the icon and launch images instead of the standard target->general location, although this is where you still have the option to not choose "Don't use asset catalogs".

It's really helpful because you'll only see 1 image name instead of duplicate names with extensions like "@2x" and "-568h@2x".

enter image description here


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...