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
1 answer

iOS - allow app to receive image from another app

We'd like to allow developers to send an image to our app via a UIActivity. How can we set up our app to support this?
MA2
  • 43
  • 4
0
votes
1 answer

How do we know what gets done with data objects passed to UIActivityViewController?

For example, the documentation for UIActivityTypeAirDrop states When using this service, you can provide NSString, NSAttributedString, UIImage, ALAsset, and NSURL objects as data for the activity items. You may also specify NSURL objects whose…
Marty
  • 5,926
  • 9
  • 53
  • 91
0
votes
1 answer

UIActivity won't show image?

I'm trying to implement a custom UIActivity but it won't display my image. Here is what I'm trying to display: I made the "antenna and waves" with 10% opacity so that they would be displayed. Here is what I got: How do I fix this? Does the opacity…
Macro206
  • 2,143
  • 3
  • 19
  • 25
0
votes
1 answer

Dismiss UIActivityView before completing the activity

I am using a custom UIActivity to share a picture on a facebook friends wall. I am using a customViewController in order to display a TableView that lets the user pick the friend to which to share the photo, which I return from the overridden…
Tibor Udvari
  • 2,932
  • 3
  • 23
  • 39
0
votes
1 answer

UIActivity custom activityViewController crash on iPad

I have a custom UIActivity that I use in order to create a Contact to the device's AddressBook. In this UIActivity, I create an ABNewPersonViewController, put it inside a UINavigationController and return it in UIActivity's - (UIViewController…
Gerhat
  • 823
  • 1
  • 10
  • 14
0
votes
2 answers

Show UIAlertView during UIActivity:activityViewController

I have a set of UIActivities where I prepare my data into a given format and then attach it to an email the user can send. I'm using a subclass of UIActivity and I'm doing all the work in -(void)activityViewController: - (UIViewController…
Parrots
  • 26,658
  • 14
  • 59
  • 78
0
votes
1 answer

Why is there no UIActivity for Flickr?

A large variety of UIActivities have been published to provide support for additional services in iOS: https://github.com/shu223/UIActivityCollection Why has no Flickr UIActivity been published? Googling yields almost no mention of this. I'm…
charlie roberts
  • 1,659
  • 2
  • 13
  • 7
0
votes
1 answer

UIActivityTypeCopyToPasteboard How to attach Image and Text

I'm using the UIActivityViewController, and I have two items of data that I share. One is some text, and the other is an image. When I use the UIActivityTypeCopyToPasteboard, it always just copies the text component and not the image. I thought it…
Jacob Joz
  • 732
  • 1
  • 11
  • 29
0
votes
1 answer

(iOS 6) Using a custom subclass of UIActivity from outside of a UIActivityViewController

I have added sharing to my app by way of iOS 6's UIActivityViewController. In addition to the usual suspects (Twitter, Facebook, etc.) I am also using a subclass of UIActivity I created to enable sharing to another service (App.net). Everything is…
Donald Burr
  • 2,281
  • 2
  • 23
  • 31
0
votes
1 answer

UIActivity with custom image

Is there any way to made UIActivity to display custom images? By default it created metal-style-icons. Is there any way to disable it? Secondly, can I use UIActivity instead of UIActionSheet? Are there any guidelines when it should (not) be used?
msmialko
  • 1,439
  • 2
  • 20
  • 35
0
votes
1 answer

How to ensure the item of a UIActivityItemProvider is ready when UIActivityViewController presents it?

According to the docs [UIActivityItemProvider item] is run on a secondary thread. This is great for not locking up the UI, but I am finding that it does not always complete by the time the item is shown, for instance in a Mail compose screen. I am…
akaru
  • 6,299
  • 9
  • 63
  • 102
0
votes
2 answers

UIActivityController + UIDocumentInteraction

I create a UIActivictyController in my app, but i want to give the option to open in dropbox, pages and other programs installed. I know that UIDocumentInteractionController give this options, but how can i give this options in UIActivityController?
user1766496
0
votes
1 answer

Custom UIActivity with the built-in Mail appearance

I wish to use a UIActivityController with the standard activities to share a UIImage. However when the user selects Mail I'd like to do my own logic: present a form to let the user select a few options, and then compose the email myself so that I…
Clafou
  • 15,250
  • 7
  • 58
  • 89
0
votes
1 answer

Handle "Post" event of standard sharing providers

I added social sharing for my app via UIActivity. How can we handle "post" event for standard providers as FB or Twitter? It's easy for custom providers because we create UI for sharing manual, but for FB it's created automatically.
kaspartus
  • 1,365
  • 15
  • 33
0
votes
1 answer

UIActivityViewController share UIActivity not shown

I am using UIActivityViewController for camera roll image sharing: UIActivityViewController *activityController = [[UIActivityViewController alloc] initWithActivityItems:activityItems applicationActivities:nil]; [self…
ttotto
  • 826
  • 3
  • 13
  • 31
1 2 3
9
10