Search code examples
iosobjective-cipadios6

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?


Solution

  • 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;