Claireware Software

Software for Your Mac and iPhone

Social Sharing on iOS 6

The upcoming version of iOS 6 has built in ability for users to post information to various social media sites, such as Facebook, Twitter, and Weibo. In fact, Apple has added an entirely new framework in iOS 6, the Social framework, to help developers to add social sharing features to their apps.

I had the goal of making a simple way users of my apps could post to their social accounts about their usage of my apps. Nothing special, just a “I like this app” kind of thing. My design paradigm for my apps has been to use a grouped table view to hold an app’s configuration and other information, much like the Settings app. So my goal to introduce a social sharing feature was to make a fairly self contained table view cell that would enable a social sharing feature and could be easily “dropped in” to my configuration table views. I accomplished this with a class called MKSocialShareTableViewCell, which leverages the SLComposeViewController feature of the Social framework. I’ve added this class to the open sourced library iPhoneMK. You can download the code on github.

The basic usage paradigm for MKSocialShareTableViewCell is to add it as a cell you your table view as you would add any other cell (it should have its own reuse identifier), then you set the cell’s post test, images, and URLs. That’s it, as the cell will handle all user interaction.
blog comments powered by Disqus
Site logo
Claireware Software
© 2009-2012 Michael Kamprath • Privacy PolicyLegalContact