Did you like how we did? Rate your experience!



46 votes

How can I create the?

The share sheet itself is controlled by the UIActivityViewController class. You'll need to create an instance of this class, passing your image and text to the activityItems: parameter of its initializer, and then present it modally as you would any other view controller. The controller itself will handle determining the activities that can handle your items, displaying their icons, responding to taps on the icons, showing the posting UI, and actually posting or sending the resulting data. You don't have to do anything about these things. Just set the completionWithItemsHandler property to a block to find out when the view controller is finished and ready to be dismissed.

Loading, please wait...