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
0 answers

UIActivityViewController Activity Items order of appearance

I have a UIActivityViewController with system activities as well as Custom UIActivities. Can I have the UIActivityViewController show up items in a particular order? i.e I want the custom UIActivity appear first in the list of activity items in…
Xcoder
  • 1,762
  • 13
  • 17
0
votes
1 answer

Delete objects in CollectionView from UIActivity

I'm having trouble trying to delete multiple objects selected in an UICollectionView from my own UIActivity. FilesCollectionController.h @property(nonatomic,weak) IBOutlet UICollectionView *collectionView; This collection view uses file paths to…
user4617743
0
votes
1 answer

Open In For iOS App

I have to design an iOS app which will download a pdf file and there will be an "open in" by UIActivityViewController (UIActivity subclassing) .Using OpenUrl I sent data to the other application and I can get pdf data in second application. But I…
0
votes
1 answer

Unknown activity items supplied: ("")

I am using subclass of UIActivityViewController to show custom UIActivities. When Controller is showing, I am getting Unknown activity items supplied: ( "" ) in my logs. MyClass subclasses NSObject and is passed to new…
0
votes
1 answer

Custom UIActivity displaying blank screen

I have a custom UIActivity which return an UIViewController when the method - (UIViewController *)activityViewController has been called. But it end up showing a blank black screen instead of the UIViewController after clicking on the activity. Any…
0
votes
2 answers

Custom UIActivity ViewController Background Image Transparency Doesn't Work

- (UIViewController *)activityViewController I created a custom UIACtivity that returns a view controller that displays a popup. This allows the user to do some editing before performing the actual activity. With ios below 8, my background with…
cessmestreet
  • 2,298
  • 3
  • 22
  • 42
0
votes
1 answer

How can we use uiactivity class method - (void) performActivity in UIViewController class?

I'm building an article reading app for iPhone. I am stuck in some issues.I'm facing a problem in social sharing. I have tried couple of approaches. First Approach We are using Facebook sdk to share the article link,title and image. Ideally, when we…
Daljeet
  • 1,573
  • 2
  • 20
  • 40
0
votes
1 answer

UIActivity With Multiple Actions

I am setting up my app with a few UIActivity Classes. The flow is that the user views an article, and clicks action button to pull up an UIActivityViewController. - (void)prepareWithActivityItems:(NSArray *)activityItems { UIAlertView* dialog =…
0
votes
1 answer

Controlling number of recipients in a Share sheet

I want to control the number of recipients in the Message Share sheet in iOS. Is that possible? Or once it is handed off for sharing it is out of your control?
user3570727
  • 10,163
  • 5
  • 18
  • 24
0
votes
1 answer

How to change items positions in UIAcitivityViewController

Like snapshot shown, how to move wechat to bottom, like Line does? I went through LineActvity.m that is from here: https://github.com/OopsMouse/LINEActivity but nothing found about order or position.... How to make it happen? #import…
S1U
  • 825
  • 2
  • 14
  • 26
0
votes
1 answer

ios different image sizes for UIActivity subclass

iOS documentation describes that UIActivity subclass should return image for 'activityImage' with different sizes for iPhone, iPad and iOS 6, iOS 7. For iPhone and iPod touch, images on iOS 7 should be 60 by 60 points; on earlier versions of iOS,…
vietstone
  • 8,784
  • 16
  • 52
  • 79
0
votes
1 answer

ActivityItems in UIActivityViewController don't show up

I'm developing an app in iOS 7 and in it I need to show an activity controller. Below is my code, UIActivityViewController *activityVC = [[UIActivityViewController alloc] initWithActivityItems:@[UIActivityTypeSaveToCameraRoll,…
Isuru
  • 30,617
  • 60
  • 187
  • 303
0
votes
1 answer

UIActivityViewController progress & result

I am using UIActivityViewController to save a bunch of video assets to user's camera roll, but the problem is there is no way to know whether the save to photo library was successful or not, and also get error code if it was unsuccessful. Is there…
0
votes
1 answer

How can you determine if an iOS device supports airdrop

I'm scratching my head trying to determine how to detect if a device supports airdrop. My thinking was to try to get the UIActivity for airdrop and call canPerformWithActivityItems: on it. The problem is I can't figure out how to get the UIActivity…
0
votes
1 answer

How to exclude UIActivityTypeAirDrop when developing with iOS SDK 6 on XCode?

I want to exclude the UIActivityTypeAirDrop from my UIActivitySheet. Unfortunately this const is only available from SDK 7 on but I have to build for SKD 6. Defining the const by myself does not work (as expected). Is there a solution for…