UIActivity: Difference between revisions

From iPhone Development Wiki
(some info about UIActivity, my wording probably isn't that great)
 
(tiny copyedit)
Line 1: Line 1:
UIActivity represents an icon that appear in UIActivityViewController's view. (the iOS 6+ share menu).
'''UIActivity''' represents an icon that appears in UIActivityViewController's view (the share menu in iOS 6).


==Ordering==
==Ordering==
Line 11: Line 11:
  -[UIActivity _canAdjustOrder];
  -[UIActivity _canAdjustOrder];


==Custom Image==
==Custom image==


If you return an image from the method <tt>-[UIActivity activityImage]</tt> the alpha will be used as a mask for the metallic grill background. In order to have a fully custom full colour icon return the image from the method:
If you return an image from the method <tt>-[UIActivity activityImage]</tt> then the alpha will be used as a mask for the metallic grill background. In order to have a custom full-colour icon, return the image from this method:


  -[UIActivity _activityImage]
  -[UIActivity _activityImage]

Revision as of 04:17, 6 September 2013

UIActivity represents an icon that appears in UIActivityViewController's view (the share menu in iOS 6).

Ordering

You can force a custom activity to appear before another activity by returning the other activity's type string in the method:

-[UIActivity _beforeActivity];

You must also return YES in

-[UIActivity _canAdjustOrder];

Custom image

If you return an image from the method -[UIActivity activityImage] then the alpha will be used as a mask for the metallic grill background. In order to have a custom full-colour icon, return the image from this method:

-[UIActivity _activityImage]