Use Xcode Auto Layout for different image sizes on

2019-03-04 14:49发布

问题:

With Auto Layout for iPhones in Portrait, I don't want the exact same size UIImageViews for game characters on iPhone 6+ as in iPhone 4S. The 4S characters need to be smaller or else they'll look too big. Using Auto Layout how do I change image sizes between iPhones because they seem like they all change to be the same sizes regardless of constraints.

回答1:

I am sure that they would be smaller because when you add images, you add 3 sizes of the image: @1x, @2x, and @3x. These images make the image universal for all Apple devices. Try them out in your simulator.