0

I am implementing UIActivtyViewController and I want to add whatsApp image to that. (http://a598.phobos.apple.com/us/r30/Purple/v4/fa/a8/02/faa80212-7d5b-f8a2-0e86-22d619ef6dc2/mzl.cmjuugpr.png) Adusted frame 60x60.

enter image description here but I am not getting As I excepted, I am getting like following message.

what i have to do display correct image thanks in advance.

Rajesh
  • 10,318
  • 16
  • 44
  • 64
siva
  • 251
  • 2
  • 16
  • add the 30 * 30 image – Anbu.Karthik Aug 01 '14 at 12:31
  • getting like this https://www.dropbox.com/s/6ympf5lbsm3hs4t/123.png – siva Aug 01 '14 at 12:38
  • try this http://stackoverflow.com/questions/12766300/how-can-i-create-a-custom-uiactivity-in-ios-6-7, http://stackoverflow.com/questions/19468978/how-can-i-add-a-activityitem-to-upper-activity-bar-in-uiactivityviewcontroller – Anbu.Karthik Aug 01 '14 at 12:45
  • this is wrkng but is it accepted by Apple http://stackoverflow.com/questions/20891730/uiactivityviewcontroller-with-custom-uiactivity-displays-color-image-as-gray/22670582#22670582 – siva Aug 01 '14 at 12:51
  • i don't know clearly, but in my knowledge it is acceptable, – Anbu.Karthik Aug 01 '14 at 12:56

1 Answers1

0

You can only play with transparency. Colors are ignored. That's why you are getting a solid rectangle. Documentation says:

The alpha channel of the image is used as a mask to generate the final image that is presented to the user. Any color data in the image itself is ignored.

Rafał Sroka
  • 39,540
  • 23
  • 113
  • 143
  • is this solution is accepted by the Apple http://stackoverflow.com/questions/20891730/uiactivityviewcontroller-with-custom-uiactivity-displays-color-image-as-gray/22670582#22670582 – siva Aug 02 '14 at 03:50
  • if not accpted, is there any other solutioni want to provide color image only – siva Aug 02 '14 at 04:53
  • Your app might get rejected. The solution proposed in the thread you linked is using private APIs. However, you can give it a go and see if Apple approves it. If not, the only way of doing it is writing a custom activity sheet for sharing or using one of the 3rd party ones. – Rafał Sroka Aug 02 '14 at 07:42