Question

Im looking all over for a complete example of how to use a UIActivityViewController in Montouch. My ultimate goal is to be able to allow users to save an image to their album as well as share the image via facebook, twitter, sms, email, etc.

I found this question but it still left me a little lost on how to exactly go about this.

Could some one please point me in the right direction either a good example or some code to get me started?

Was it helpful?

Solution

iOS6+ provides built-in UIActivity for many services. When you provide data it will automatically populate the list of activities that match the data format (but you can remove the ones you do not want).

You can also create your own UIActivity to add application-specific activities (e..g for anything not supported by iOS).

Note that this is all iOS6+ but it's not very hard to add a similar feature (with less options) into earlier versions of iOS.

My MonoTouch sample for AirPlay use UIActivityViewController (on iOS6), as it's own custom UIActivity type (for AirPlay devices) and also works on earlier iOS releases (e.g. 5.x).

OTHER TIPS

Not sure if this is what you need, but the MediaNotes sample includes a UIActivityViewController

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top