Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

UIActivityViewController. How to customize it?

I would like to create a UIActivityViewController in my iPad application but I can't find anything on Google because it's a new view implemented only in iOS 6. UIActivityView is a view that appears when a user tap, for example, the Share button inside Photos App. A set of activities is presented by an activity view controller (Send via email, Share on facebook, print ecc...). Each activity is represented by an icon and a title that appears below the icon. Now I would like to custom the items inside the view but I can't find how to do it? Any ideas?

like image 812
user1679847 Avatar asked Sep 25 '12 09:09

user1679847


1 Answers

There's no need to subclass UIActivityViewController. Instead, create your own UIActivity subclasses, and then instantiate UIActivityViewController with an array of your activities using:

- (id)initWithActivityItems:(NSArray *)activityItems applicationActivities:(NSArray *)applicationActivities;
like image 178
Caleb Avatar answered Nov 14 '22 23:11

Caleb