UIDocumentInteractionController Tutorial
UIDocumentInteractionController is a powerful class available to iPhone developers that let developers to provide in app support to their users. For example a wallpaper application, that allows user’s to save wallpaper images in their photos app of the device.
For this purpose developer has two options
1). Save image to photo gallery programmatically
2). Present UIDocumentInteractionController to user which has inbuilt option to save image or send image to other apps that are capable of opening that particular document (in our case its an image).
In this article we are going to learn about UIDocumentInteractionController and its integration in iOS.
Integrating UIDocumentInteractionController
First create an instance of UIDocumentInteractionController , we will use interactionControllerWithURL method which require url of the file we are going to save or you can say want to send to other apps. Then we will set its delegate to self.
In your .h file create a property of UIDocumentInteractionController instance.
in your .m file. in viewDidLoad or your button IBAction
thnx for this fix
fukall font style selection. i'm outta here :/
Nice Post 🙂
@Carona Williams, Yes you can share text with image but for that you have to create a new image that contains image(you want to share ) and text written below it by taking screenshot of the device screen programmatically and then share this new image using UIDocumentInteractionController.
Pingback: Create UIDocumentInteractionController in swift - iOSTutorialJunction