Questions tagged [uiactivityviewcontroller]

The UIActivityViewController class is a standard view controller that you can use to offer various services from your application (on iOS).

The UIActivityViewController class is a standard view controller that you can use to offer various services from your application. The system provides several standard services, such as copying items to the pasteboard, posting content to social media sites, sending items via email or SMS, and more. Apps can also define custom services.

Resources:

1252 questions
10
votes
0 answers

What is the UIActivityType for Notes?

I am trying to exclude all services from my UIActivityType except for email and text message. I am using the following statement: activityController.excludedActivityTypes =…
C6Silver
  • 3,127
  • 2
  • 21
  • 49
10
votes
4 answers

UIActivityViewController remove redundant space when share to Messages

I have similar code in my project, and I get redundant space between share items. Is it possible to remove it? let text = "Some text\n" let link = NSURL(string: "http://stackoverflow.com/")! let items = [text, link] let activityVC =…
ChikabuZ
  • 10,031
  • 5
  • 63
  • 86
10
votes
5 answers

Blank screen after share content using UIActivityViewController

I share some contents using the following code var textToShare = "Test" let activityVC = UIActivityViewController(activityItems: [textToShare], applicationActivities: nil) activityVC.excludedActivityTypes = [UIActivityTypePrint,…
Morteza Soleimani
  • 2,652
  • 3
  • 25
  • 44
10
votes
5 answers

Sharing image using UIActivityViewController

Sharing a image from UIImageView using UIActivityViewController? I am trying to share a image using UIActivityViewController, but I get error: func shareIMG(){ let activityItems = [self.imageView.image] let avc =…
Eri-Sklii
  • 549
  • 4
  • 10
  • 21
10
votes
1 answer

UIActivityViewController Hide More from Actions

When I initialize the UIActivityViewController and disable all actions, I still see a More button under the actions bar. Is there a way to remove it? This is how I initialize it: let activityVC = UIActivityViewController(activityItems:…
xoail
  • 2,978
  • 5
  • 36
  • 70
10
votes
2 answers

Limiting UIActivityViewController share extension activities

I'm using UIActivityViewController with several custom UIActivityProviders. My providers return NSString, UIImage, and custom data objects. I exclude activities I don't want to share by setting UIActivityViewController excludedActivityTypes and…
Dan
  • 631
  • 6
  • 20
10
votes
3 answers

Present UIActivityViewController- LaunchServices:invalidationHandler called

I've already looked at related questions here and here, and I have implemented the suggested answers to no avail. I have a UIBarButtonItem on a UIToolbar, with Connection for Send Action to btnTBAction_touch: In the ViewController's class header I…
chriszumberge
  • 844
  • 2
  • 18
  • 33
10
votes
5 answers

Sharing via UIActivityViewController to Twitter/Facebook etc. causing crash

On iOS8 I'm using a UIActivityViewController to share a UIImage to Facebook/Twitter etc. It seemed to be working fine, but today it suddenly started crashing when running the code on my iPad. However, it still works as expected in the simulator. My…
Christian J. B.
  • 491
  • 1
  • 5
  • 16
10
votes
1 answer

UIActivityViewController when have no Facebook account in settings

I'm using UIActivityViewController, I want to show Facebook option even if the user has not defined a Facebook account in device settings. In my code, Facebook option not shown when there is no Facebook acoount in settings. UIActivityViewController…
zeevblu
  • 1,059
  • 2
  • 11
  • 26
10
votes
8 answers

UIActivityViewController completion handler still calls action if user presses cancel

In my UIActivityViewController, I use completion handler to execute a "successfully shared" notification. It works but my only problem is, it still shows the notification if the user presses cancel. Here is my completion handler code, [controller…
Colton Anglin
  • 431
  • 3
  • 9
  • 19
10
votes
10 answers

UINavigationBar Appearance on Modal Not Setting

I am using the following code in my appDelegate to set the appearance of my UINavigationBar and status bar throughout my app: [[UINavigationBar appearance] setTintColor:[UIColor whiteColor]]; [[UINavigationBar appearance]…
Nick
  • 517
  • 1
  • 6
  • 24
10
votes
4 answers

Adding an obvious (custom) button to UIActivityViewController

I would simply like to add the obvious button "Open in Safari" How can I do it in a simple way. #pragma mark - Share the link - (IBAction)activityButtonPressed:(id)sender { NSString *textToShare = @"I just shared this from my App"; //…
chewy
  • 8,207
  • 6
  • 42
  • 70
10
votes
1 answer

UIActivityViewController send html mail ios6

I am using UIActivityViewController with my iphone application to share a picture and a text. I use this tutorial to custom the text for the differents services…
amau96
  • 857
  • 1
  • 8
  • 19
10
votes
1 answer

Example of how to customize UIActivityViewController share menu?

Is there an example of how to customize UIActivityViewController share menu with my own icon and IBAction? I have seen this... - (id)initWithActivityItems:(NSArray *)activityItems applicationActivities:(NSArray *)applicationActivities; but I have…
OscarTheGrouch
  • 2,374
  • 4
  • 28
  • 39
9
votes
0 answers

UIActivityViewController Options button

In a UIActivityViewController, where does the Options button come from? For example, here's how Safari presents the activity view: Next to apple.com there's an Options button that lets the user choose a format for sending the data. How can I make…
matt
  • 515,959
  • 87
  • 875
  • 1,141