Adding a share function for webView - iOS - ios

I have an app which display a table view. When a user taps on a cell the view goes to the detail view. The detail view has a UIWebView, based on which cell is tapped the detail view opens a online PDF file within the web view. The PDF is stored on the server.
I am trying to add a share function within my app so a user can share that link of the PDF they are viewing in the detail view via email or text.
I am trying to add this:
I have not tried anything yet mostly because I have no clue where to begin. My question is that whether it is possible to implement this, if so can you guide me in the right direction.
P.s ( I only want to share via Email OR Text) NOT via social network

You can store PDF url in member variable so that you can use that variable and pass while sharing on different social media.

Related

iOS Embed Activity (share) View Inline

The iOS UIActivityViewController overlays existing content as a stack. It is customisable but is there a way to move its position entirely and embed it inside another view.
Say I have a list of the user's contacts whom use my app. When clicking on one of those contacts, instead of overlaying the ActivityView, the contact would expand (accordion) and reveal certain elements of the ActivityView to allow user sharing.
I appreciate that this can be done by writing a custom Activity View however, unless I'm mistaken, there is no way to ascertain whether the user has certain other apps installed to allow sharing via WhatsApp or Messenger for example.

Hide share options in Safari View Controller

Is there any way to hide the share option in Safari View Controller, which is coming by default?. I am trying to hide the extra options which are given by default with the Safari View Controller but not able to do so.
Let me know if anybody knows about this.
Thanks!
SFSafariViewController is not meant for customizations. Even Apple documentation says to use WKWebView if you want to customise the look and feel of safari view controller.
From Apple documentation
Choosing the Best Web Viewing Class
If your app lets users view websites from anywhere on the Internet,
use the SFSafariViewController class. If your app customizes,
interacts with, or controls the display of web content, use the
WKWebView class. When you adopt SFSafariViewController and a user
presses a link to peek at and then pop to the link’s destination, the
user views web content from within your app. Tapping Done, the user
returns to the view controller that was displayed before the web
content was loaded. When you instead use the WKWebView class, Peek and
Pop sends the user to Safari by default.
On the other hand, SFSafariViewController does provide some kind of UI customization. You can only change the preferredBarTintColor and prefererredControlTintColor. iOS 11 has new option to set initial configuration by using #NSCopying var configuration: SFSafariViewController.Configuration { get } but sadly that will not help you either

Implementing VFR PDF reader in app

I'm new to programming and am currently working on creating a app to view PDF's for a class project.
I have added the necessary framework and files for VRF reader. I already have a slide out menu that links to different web pages and an about page. On one page I have two buttons and I want each of them to open a different PDF. I am at a loss for how to make those buttons implement the action to open a file and how to differentiate between the two pdf by which button is pressed.
I know that is a big step from where I am at to where I want to be but if anyone could help thanks in advance.

embed ios8 share sheet into a frame?

Is it possible to present the standard IOS8 share sheet on a page while also showing other content on that page? We want to have a few other sharing options that are more customized along with a view of the standard share sheet but ideally we don't want the share sheet options to require an additional action (and a window popping up over the other stuff) - we just want everything to appear at once. Possible?
technically.. yes. you could mess with the view structure and modify it to your heartss desire
BUT that would be a nogo if you want to target the App Store
note: I am assuming here that you don't want to just modify the controller as specified by the docs. thats of course possible ;)

creating an interactive page (videos, photos) for sharing on iOS device

I am building an iOS app, using storyboard. I have created a page where the user can create a page that will then be then published on DropBox and shared between all app users. this page lets you add photos, videos (not yet), and textviews (with scrolling enabled). Until know when the user presses the upload button, a screenshot is taken and uploaded, then views from a table view. but obviously it is just an image, so you can't scroll the textfields to see all the content and if I wanted to add the video support it would not be able to play it. I tried doing research on the internet, but I am a bit confused. Do I have to save all the components (UITextField...) separately, and place them in the same DropBox folder, and then put them all back together? What do you suggest? Is there a way?
Of course you will have to save the data separately...how else would your program know how to create the view? I recommend JSON or XML. Don't ask about how to structure it, that is a different question and one you should think about yourself.

Resources