uiactivityviewcontroller

UIActivityViewController - can't understand this memory leak

我与影子孤独终老i 提交于 2019-12-11 16:31:46
问题 Can someone please tell me why the following code is leaking in Instruments? UIActivityViewController *activityController = [[UIActivityViewController alloc] initWithActivityItems:activityItems applicationActivities:nil]; activityController.excludedActivityTypes = [NSArray arrayWithObjects:@"a",@"b", nil]; [self presentViewController:activityController animated:YES completion:nil]; [activityController release]; Instruments show the leak on row: activityController.excludedActivityTypes =

Twitter preview sheet appears in English instead of language device on iOS 6 using ActivityViewController

柔情痞子 提交于 2019-12-11 14:10:01
问题 I'm using the new ActivityViewController to give the user the possibility to share a message in Facebook or Twitter. I've changed the excludedActivityTypes property in order to show only the Facebook and Twitter buttons on the ActivityViewController. In the activityItems array I have only a NSString with the text to share. Here is the code: NSString *text = @"Text to share"; NSArray *activityItems = [NSArray arrayWithObjects:text, nil]; UIActivityViewController *avc = [

UIActivityViewController with Text and Mail only

风格不统一 提交于 2019-12-11 13:17:29
问题 I'd like to create a UIActivityViewController with just the text and mail activities. How would I do this? The documentation seems to be fairly sparse in substance. I'm using the following code to present my UIActivityViewController : NSArray *Items = [NSArray arrayWithObject:@"text"]; UIActivityViewController *ActivityView = [[UIActivityViewController alloc] initWithActivityItems:Items applicationActivities:nil]; [self presentViewController:ActivityView animated:YES completion:nil]; Which

UIActivityViewController - order of items

孤街浪徒 提交于 2019-12-11 11:36:21
问题 I Have an array of items I want to share. How can I force to have a specific order? For example: NSArray *itemsToShare = @[text, image, image, audio] The order of the items in the array does not work for the order in the shared app. 回答1: You can't force a specific order of shared items, the shared items isn't the issue anyways, that's just telling the delegate what UIActivity applications to populated based off the array of information you provided. Your trying to reorder the applications

How can I send emails from my custom UIActivity class?

拈花ヽ惹草 提交于 2019-12-11 10:39:54
问题 I made a costume UIActivity class. I like to send emails with attachments with the class, but I can't send emails, or present any ViewControllers from the class. I am trying to present the Mail ViewController with this: - (void)prepareWithActivityItems:(NSArray *)activityItems { NSString *subject = [NSString stringWithFormat:@"%@", [self.filePath lastPathComponent]]; NSString *messageBody = [NSString stringWithFormat:@"%@ was extracted with @FilyForiOS, visit", [self.filePath

Failed to determine whether URL is managed by a file provider

瘦欲@ 提交于 2019-12-11 08:47:52
问题 Since two days I have this problem I tried a lot, https://stackoverflow.com/a/51764198/10392572 https://stackoverflow.com/a/46457518/10392572 https://stackoverflow.com/a/51218715/10392572 If I'm right, UIActivityViewController need an array of url(s) of the file(s) and documentInteractionController need an url and both ask user what he want do, but every time, if the user use "save to file" I have: [default] [ERROR] Failed to determine whether URL /Users/lukashedinger/Library/Developer

Multiple data from UIActivityItemSource

大憨熊 提交于 2019-12-11 04:39:35
问题 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 an NSArray and passing that, but it threw and exception. 回答1: Turned out all I needed to do was provide multiple items to the activity controller, since each activity item source can only provide one item. 来源: https://stackoverflow.com/questions

UIActivityViewController remove bottom part

为君一笑 提交于 2019-12-11 04:33:14
问题 Is there anyway to remove the bottom part from UIActivityViewController? also - Is there anyway to remove the MORE icon from UIActivityViewController? thanks 回答1: In iOS 8.2 , UIActivityViewController shows only a single row for UIActivityCategoryShare activity types if we do not provide any custom UIActivity . In iOS 8.3 onwards, UIActivityViewController shows two lines whether you provide your own custom UIActivity or not. Below are the screenshots for both: For iOS 8.2 For iOS 9.0 This is

iOS 9 crash when presenting UIActivityViewController : [UIView _fromWindowOrientation] unrecognized selector sent to instance (UIView)

一个人想着一个人 提交于 2019-12-11 04:01:37
问题 My app is crashing any time I present a UIActivityViewController , only on iOS9. I've isolated the code down to this: (Cleared everything from the AppDelegate minus setting my test view controller as the root and only VC). In the test view controller on button tap: (I made the activityVC an instance property to check if there was a deallocation issue because other debugging efforts suggested that the activityVC might get dealloced during presentation) NSString *string = @"PLS WORK"; self

How to rearrange activities on a UIActivityViewController?

懵懂的女人 提交于 2019-12-11 00:47:52
问题 I'm using a UIActivityViewController , but I want to rearrange the order of the available activities. Right now it chooses what order to display them in, and has a bunch of them on a single scrollable line, and then more below a separator. Is it possible to rearrange the order these are displayed in, or to move some of them below the separator line? 回答1: You can't reorder the activities except for your custom activities. They will appear in the order you supply them. But they always come