I'm confused about how to share the contents of a UIWebView in Swift to Social sites such as Facebook and Twitter. I have watched many videos and articles on how to share them. But couldn't find an answer.
I'm making a News App on Xcode where the view controller holds a UIWebView that displays the article for that particular day. My UIWebView loads the data successfully, but I can't find the code to share the contents to Social apps.
Kindly help.
You can share the Url loaded in web view or else if you want share the contents you can check in cache for same, if no content found you will need to download the contents from url.
like:
Edit: Share Url
for social share there is property url or else you can set it initial text also, as per your need
you can get the url like:
and share this obtained url.