iossize-classesios-universal-app

iOS changing view properties for different size classes


I was wondering if it is possible to change different view attributes for a particular size class.

For example, I have an ImageView I chose a size class for iPads, I want to change the background image for that size class only.

I thought that selecting the size class and changing the property applys the changes to that size class only, but that seems to not be the case?

Is there anyway to achieve this with the interface builder? Rather than going into code, and detecting if it is a iPad and applying the changes from there?


Solution

  • No, using size classes you can only change few attributes like font size for UILabel etc... if you want to change background image for iPad i suppose only option is by detecting if device is iPad or not.