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
2
votes
2 answers

Using UIActivityViewController in monotouch

Im looking all over for a complete example of how to use a UIActivityViewController in Montouch. My ultimate goal is to be able to allow users to save an image to their album as well as share the image via facebook, twitter, sms, email, etc. I found…
Deekor
  • 9,144
  • 16
  • 69
  • 121
2
votes
1 answer

Add custom UIActivity for standard apps

dear community, A simple question but no clear answer yet. Can I add my button to standard UIActivityController so that when user goes to Photos/Notes/Safari he can also along with twitter/facebook post it to my destination ? I'm sure I can do…
Dannie P
  • 4,464
  • 3
  • 29
  • 48
2
votes
1 answer

UIActivityViewIndicator in browser while loading and if string contains http:// remove it

I'm creating a simple web browser as an exercise. -(IBAction)go:(id)sender { NSString *query = [_urlField.text stringByReplacingOccurrencesOfString:@" " withString:@"+"]; NSURL *url = [NSURL URLWithString:[NSString…
Thiebout
  • 171
  • 3
  • 15
1
vote
1 answer

UIActivity without reading a stored file into into memory?

My app writes huge images (billions of pixels). The image is too large to read as a UIImage or as Data. Typically, when I share images with an activity controller, I do this: var data: Data data = ... activityViewController =…
Jeshua Lacock
  • 5,730
  • 1
  • 28
  • 58
1
vote
0 answers

Sharing text in LinkedIin showing unsuccessful message

Using native sharing text feature by UIActivityViewController. Its successfully posting on share in a post, able to see in my LinkedIn page but showing error message in UI. let text = "This is the text....." let textShare = [ text ] …
Ramdhas
  • 1,765
  • 1
  • 18
  • 26
1
vote
1 answer

UIActivity from UIActivityType

Is there a way to get UIActivity from and an existing UIActivityType? So I can construct UIActivityViewController like: let activityViewController = UIActivityViewController(activityItems: [], applicationActivities:…
Reimond Hill
  • 4,278
  • 40
  • 52
1
vote
0 answers

UIActivityTypePrint causes UIActivityViewController not to show

I try to share some documents I get following error: 2017-12-12 17:12:47.466089+0100 MyApp[415:77472] viewServiceDidTerminateWithError:: Error Domain=_UIViewServiceInterfaceErrorDomain Code=3 "(null)" UserInfo={Message=Service Connection…
Ammar Hadzic
  • 190
  • 3
  • 19
1
vote
0 answers

How do I preselect the service that will be chosen in a UIActivityViewController?

I am wondering how Dolly (iOS app) does this. If I select the Twitter icon in the first screenshot, the view in the second screen appears immediately. That second screenshot is what is presented after you typically click the Twitter service from…
1
vote
0 answers

UIActivityViewController with UIActivity mail error 'unrecognized selector sent to instance' for setSourceIsManaged

I am using Swift 3 on iOS 10. I am using the UIActivityViewController with subclass of UIActivity with activityType set to mail. When the call to present UIActivityViewController is made I get an error in the debugger which says: 2017-05-26…
daniel
  • 1,446
  • 3
  • 29
  • 65
1
vote
0 answers

How to custom UIActivity for sharing video in youtube

when I use UIActivityViewController to share video, the ActivityView display facebook ins Twitter Tumblr etc but there is not youtube so I want to write a custom UIActivity for sharing video in youtube But I my English is too poor to understand…
riceFun
  • 11
  • 2
1
vote
0 answers

Showing "Import with Instagram" in UIActivityViewController

I am trying to add Instagram in "Share To" functionality in my app. I have seen the Instagram's iPhone hooks documents. I have created custom UIActivty which works fine but my question is, is there a way to add "Import with Instagram" functionality…
vava044
  • 51
  • 8
1
vote
0 answers

Local variable class is null

I have one problem. RestKit I use in my application. When I receive data over the network, I keep them in the object and then use the various fields of the class. In my case I get an article in which there is a field of URL, which is used in…
user2759544
  • 181
  • 1
  • 10
1
vote
0 answers

Save image to app album with UIActivityViewController

I am using UIActivityViewController to share and save images in my app. Right now, images get stored in global Camera roll. I want to save it to app's own album. To do that, I had to exclude UIActivityTypeSaveToCameraRoll from…
gsrivast
  • 141
  • 1
  • 8
1
vote
1 answer

Multiple data from UIActivityItemSource

Is there any way to provide multiple objects from a UIActivityItemSource? For example, I would like to provide an NSString and UIImage to Mail, Facebook and Twitter so they are included in the same email/post/tweet. I tried putting the objects in…
Siegfoult
  • 1,844
  • 17
  • 19
1
vote
2 answers

Copy Link Button in UIActivityViewController

Is there a service or parameter I am missing to create the "Copy Link" button as seen in Apple's 12 Days app? I am able to get the Copy button to appear by allowing UIActivityTypeCopyToPasteboard in my UIActivityViewController, and passing it a…
DenVog
  • 4,226
  • 3
  • 43
  • 72