0

iOS documentation describes that UIActivity subclass should return image for 'activityImage' with different sizes for iPhone, iPad and iOS 6, iOS 7.

For iPhone and iPod touch, images on iOS 7 should be 60 by 60 points; on earlier versions of iOS, you should use images no larger than 43 by 43 points. For iPad, images on iOS 7 should be 76 by 76 points; on earlier versions of iOS you should use images no larger than 60 by 60 points. On a device with Retina display, the number of pixels is doubled in each direction.

What is the correct way to return the image:

  • Create if/else block following the device iPHone/iPad and iOS6/iOS7 to return. I think this not the best way.

  • Name the images following the naming convention (such as suffix ~iPHone, ~iPad, ....), then we just create the image with one name in coding. The system automatically match the correct image file. I think this is the best way, but I don't know the naming convention.

Which is the way should I use? Thank you!

vietstone
  • 8,784
  • 16
  • 52
  • 79

1 Answers1

0

The best way to do that is always follow the Apple standard:

For iPad: - someIpadImageIcon@2x~ipad - someIpadImageIcon~ipad

For iPhone: - someIphoneImageIcon@2x - someIphoneImageIcon

Hope it helps you

Gabriel Goncalves
  • 5,132
  • 3
  • 25
  • 34