UIActivityViewController uses items in certain actions

I have a UIActivityViewController and I want it to have all Safari actions and more. Currently I can receive mail, messages, twitter, facebook and a half-working copy. I installed an array of activity elements with a url. Then I added the nsstring of that url and added that with the url and everything works fine, like copying works better by copying a string and I paste it into other areas. But also having a line, twitter and facebook added URLs to their text and included the link. How can I make them have no text, just a link? Another problem is how can I show a preview of web pages in a twitter link and facebook activity? it just shows the safari icon. And the third question: how to print the contents of a web page?

+4
source share
3 answers

To provide different elements for different services , you are a subclass of UIActivityItemProvider . It conforms to the UIActivityItemSource protocol, so you implement the method:

 - (id)activityViewController:(UIActivityViewController *)activityViewController itemForActivityType:(NSString *)activityType { // compare `activityType` and return what you want } 
+5
source

I found this http://www.albertopasca.it/whiletrue/2012/10/objective-c-custom-uiactivityviewcontroller-icons-text/ , which shows how to make different materials for each service

+5
source

For twitter or facebook, you would like to configure UIActivity with the correct type of Twitter / facebook message (see Constants below here ) and payload.

0
source

All Articles