Proper Use of Asset Catalog for iPad Pro

In my application, I have the edge of the image to the edge, and I'm trying to set a different image for the iPad and iPad Pro 12.9. The resolution is really different from the Pro and non-Pro versions, so I have to use different image sizes. Is this possible using an asset catalog or should I use if-elsein code?

+4
source share
1 answer

For this you must use size classes.

Import two images into the asset catalog and set a larger image for a class of any size (width class / height class), and then limit the smaller image to rest (Compact / Regular).

See width class and height class

0
source

Source: https://habr.com/ru/post/1653426/


All Articles