iosxcodeuiimageasset

Image assets not working for size classes in universal application


I am trying to give different image for my universal app, that is for iPhone(compact,any[-,*]) and iPad (regular,regular[+,+]). When I run the app for iPhone, it is always taking image I placed in [,], below is my settings in my image assets.

So for me if I use below settings for iPhone I am not getting image, even though i added image in (compact,any[-,*])

enter image description here

P.S. If i select iPhone and iPad instead of universal in image assets it is working, But it is not working in iPad split screen multitasking.


Solution

  • It turns out to be apple bug, for image view it is working correctly, but for UIButton it is having issues. https://forums.developer.apple.com/thread/16116