iOS Embed Activity (share) View Inline - ios

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.

Related

Is it possible customize SFSafariViewController like edit "Share" button?

Is it possible customize SFSafariViewController like:
- change "Share" button
- or add new button on same toolbar where "Share" and "Compass" buttons are
Any help will be appreciated.
No. However, you can change some specific configuration of that controller. Namely:
through SFSafariViewControllerConfiguration, you have barCollapsingEnabled and entersReaderIfAvailable.
Data for activityItemsForURL and excludedActivityTypesForURL.
preferredBarTintColor and dismissButtonStyle, etc...
Apple says:
Important
In accordance with App Store Review Guidelines, this view controller
must be used to visibly present information to users; the controller
may not be hidden or obscured by other views or layers. Additionally,
an app may not use SFSafariViewController to track users without their
knowledge and consent.
Lastly, indeed, you may use WKWebView instead for further customisation of your screen.
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.
Read doc: https://developer.apple.com/documentation/safariservices/sfsafariviewcontroller

Take screenshots programmatically of entire scrollable area of another app in iOS

Currently it is cumbersome for the user to repeatedly scroll and take a screenshot if they want to capture more than what can fit on the screen at a time.
I would like to implement functionality such that at the request of a user (e.g. via tapping a special button on a custom keyboard), screenshots of the entire scrollable area of the currently opened app are automatically taken and stitched together.
Is this possible? And if so, how?
To clarify, the application containing the scrollable area is a third party application over which I have no control, e.g. iMessage or Facebook.
Edit: I am aware of answers like this one and this one that are about taking screenshots within an app that I control. As far as I can tell, these are not applicable in my situation. Please correct me if I am wrong about this.
This is not possible. Each app is contained in a protected sandbox that no other apps have access to.
You could make a custom keyboard, but you still wouldn't have access to any of the views in the app that you don't control.

Adding a share function for webView - 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.

How does WhatsApp add their icon to their contacts tab and favourites tab in iPhone SDK

I have been working on app which needs phone contacts,i am able to get the name and phone numbers from the AddressBook.
But want to make tab like whats app has done,they open the default Address Book with icon of whats app in in front of contact number if the user is available on WhatsApp and also the status of the contact person.
How does the WhatsApp add icon to the number and add status to their contacts tab?
Also i am confused whether the contacts tab in WhatsApp using default UIAddressBookController or they made custom.
For more clarity please check the screenshot that i have added.
Kindly suggest me how can i achieve this in my app using the default ABPeoplePickerNavigationController.
I am pretty sure that this is a custom view controller that mimicks the original detail view of a contact. It looks similar but is still different. There is no "groups in common" or status or whatsoever in the standard detail view. Also, this is a standard system component that you can and should not override.
They will probably be using the API to access the Contacts and present them in their own view controllers.

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