问题
Here's the screenshot:
In my subclass of UIActivity, I override the -activityImage method to use my own icon for the facebook share item, but it appears in the share panel but disappears in the MORE list.
回答1:
Quite old question, but maybe the solution is helpful for others too!
In your UIActivity subclass implement/overwrite the method
- (UIImage *)activityImage {
return [UIImage imageNamed:@"Activity Icon"];
}
to return the image to be shown in the UIActivityViewController itself (as you've done).
In addition to this implement/overwrite the method
- (UIImage *)activitySettingsImage {
return [UIImage imageNamed:@"Activity Settings Icon"];
}
to return an(other or the same) image to be shown in the more/settings view.
回答2:
Have you checked that your image has this format
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.
You can also check the reference: https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIActivity_Class/index.html#//apple_ref/occ/instm/UIActivity/activityImage
来源:https://stackoverflow.com/questions/26055040/uiactivityviewcontroller-not-showing-my-custom-activity-image-in-the-more-list