I have a UIActivityViewController and i want to make it have all the actions safari does and more. Currently i can only get mail, messages, twitter, facebook and a semi-working copy. I set the activity items array with a url. I then added a nsstring of that url and added that with the url, and everything worked good like copying worked better by copying the string and i paste it in more areas. But when having the string also, twitter and facebook added the urls into their text and include the link. How can i make it so they dont have the text, just the link? Another issue is how can i show the web view preview in the link on the twitter and facebook activities? it just shows a safari icon. And third question is how can i print the contents of the web page?
To provide different items for different services, you subclass UIActivityItemProvider
. It conforms to UIActivityItemSource
protocol, so you implement method:
- (id)activityViewController:(UIActivityViewController *)activityViewController
itemForActivityType:(NSString *)activityType {
// compare `activityType` and return what you want
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With