Questions tagged [uiactivity]

The UIActivity class is an abstract class that you subclass in order to implement application-specific services. A service takes data that is passed to it, does something to that data, and returns the results. For example, a social media service might take whatever text, images, or other content is provided to it and post them to the user’s account. Available in iOS 6.0 and later in UIKit.

The UIActivity class is an abstract class that you subclass in order to implement application-specific services. A service takes data that is passed to it, does something to that data, and returns the results. For example, an social media service might take whatever text, images, or other content is provided to it and post them to the user’s account. Activity objects are used in conjunction with a UIActivityViewController object, which is responsible for presenting services to the user.

You should subclass UIActivity only if you want to provide custom services to the user. The system already provides support for many standard services and makes them available through the UIActivityViewController object. For example, the standard activity view controller supports emailing data, posting items to one of the user’s social media accounts, and several other options. You do not have to provide custom services for any of the built-in types.

Subclassing Notes

This class must be subclassed before it can be used. The job of an activity object is to act on the data provided to it and to provide some meta information that iOS can display to the user. For more complex services, an activity object can also display a custom user interface and use it to gather additional information from the user.

136 questions
0
votes
2 answers

How Create UIActivityIndicator computed property from a function in extension

I have managed to create a UIActivityIndicatorView extension for turning animating it to start and stop. However I would like make it better by using a computed property of type bool using a get and set. I have tried but can't think of way to do it.…
mandem112
  • 181
  • 14
0
votes
1 answer

uiactivity and uiwebview delegate

I have a uiactivity view in my project. I want to start animating while the page is loading and stop and hide when the webview finally loads. this is not working in my case. I have tried to use the UIWebViewDelegate, but it is deprecated. class…
user4422315
0
votes
1 answer

How to exclude action activities from the UIActivityViewController?

I am using a UIActivityViewController to share a invitation text to my app. I am trying to exclude all activities with the action category besides Notes App. I am unable to exclude "Save to Files" option. Is there any way to exclude the view with…
Ariel Antonio Fundora
  • 1,330
  • 15
  • 20
0
votes
0 answers

Instantiating UIActivity subclass

When sharing an image from, eg Photos, I want my iOS app extension to appear in the list of apps available (next to Mail, Messages...) in order to receive the shared picture. Reading many sites reveals I have to subclass UIActivity and add it to an…
Laurent Crivello
  • 3,809
  • 6
  • 45
  • 89
0
votes
0 answers

UIActivityViewController with PDF file in Swift

import UIKit import WebKit class MGENVC00004: UIViewController{ //button action @IBAction func shareTextButton(_ sender: UIButton) { let db = CommDB() let sql = "select CW_VAL " + "from CW99MM000080 " + "where cw_s_module = '33' " + "and cw_s_ind…
GTeckHan Goh
  • 97
  • 1
  • 3
  • 12
0
votes
2 answers

UIActivity indicator or spinner in this case indicator is not showing up

So, I have written a program that is a map app which allows user to see there location when they open the app and when they double tap it allows them to drop a pin the bottom view which is hidden shows up and i want to show images in that view…
0
votes
0 answers

UIActivityViewController Style in iOS10

I am new to ios and I have a problem on displaying UIActivityViewController. I have done the code and it works fine on ios8&9 iPad, but when I tested on ios10 iPad 5th and the UIActivityViewController frame was restricted by its parent view…
Janice Zhan
  • 571
  • 1
  • 5
  • 18
0
votes
1 answer

How to show only specific UIactivity Items In uiactivitycontroller

I would like to show only mail, imessages and whatsapp in uiactivitycontroller. Exclude activity types only excludes default types and shows others. Is there a way to show only the above mentioned activity. Thanks in advance
0
votes
1 answer

Objective-C version of a custom UIActivityType

In swift, this is quite simple. For example, if I want to add a custom Pinterest UIActivityType: extension UIActivityType { static let postToPinterest = UIActivityType(rawValue: "pinterest.ShareExtension") } This is all I have to do. However,…
0
votes
1 answer

Show UIView from UIActivity

What's the best way to present a UIView on a UIViewController from inside a UIActivity. I tried the code below but that's not working. Aside from that there doesn't seem to be any documentation on this. - (void)performActivity { ... do some…
user4992124
  • 1,574
  • 1
  • 17
  • 35
0
votes
1 answer

Ho do I get to know whether specific app is installed on user device?

My goal is to create custom UIActivities for Google+, Pinterest and LinkedIn for social share. And my custom activities should appear in UIActivityViewController only if native apps are absent (aren't installed - means native share won't appear in…
Bogdan Laukhin
  • 1,454
  • 2
  • 17
  • 26
0
votes
1 answer

How to access the UIView from a UIActivity custom object?

I am using UIActivityViewController with custom activities and I want to do access the view of the activity that was selected. Is there any way to do this ? According to Apple there is activityImage for accessing the UIImage but nothing for the…
Vasile Cotovanu
  • 1,510
  • 2
  • 11
  • 13
0
votes
2 answers

Force dismiss iOS share sheet manually Swift iOS 8 and 9

I am using UIActivityViewController to display options. Then select Twitter or Facebook, it appears iOS share sheet. Is there any way to dismiss share sheet manually? I cant see any delegate to this. Here is my code: let arrObjectsToShare = [self,…
Bonnke
  • 896
  • 1
  • 12
  • 24
0
votes
1 answer

Customising UIActivity for UIActivityTypeMessage

I'm sharing an image and its description text using UIActivityType. I need to share the URL of the image if I choose SMS sharing option. How can I do that? Currently I'm sharing the image and data to Facebook and Twitter. How to send the URL in case…
0
votes
1 answer

iOS 7 & 8 custom activityImage differences

Since iOS 7 we've included custom activityImages for sharing purposes through the UIActivity component. According to this official Apple documentation it states that every non-transparant pixel will be overlayed by a grey gradient. The images we…
Yannick
  • 1,076
  • 1
  • 11
  • 23