简体   繁体   中英

Assets.xcassets in iOS project for buttons image

Can I use Assets.xcassets in iOS project for buttons image or only for backgrounds and app icon?

In my universal application, I use Assets.xcassets to set images for background and app icons for all view sizes. Can I use that for any button or image view?

Yes, you can store any type of image for any purpose in the Assets.xcassets .

You can read some further information on the Apple Developer portal about the Asset Catalog.

Yes, you can use it.

Go to assests.xcassets -> tap + button on the bottom left corner -> New image set.

Now change the set name and add 1x/2x/3x images (or pdf). You can find this picture by name in Interface builder or from code.

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM