uiactivity

How to add custom buttons to UIActivityViewController?

感情迁移 提交于 2019-12-19 03:14:32
问题 I am using UIActivity in ios7. It is working fine with a few lines of code. Now i want to add instagram share button to it. Is there a way to add custom buttons to the action sheet? This is how i am creating the UIActivityViewController : NSString *textToShare = self.navigationItem.title; NSArray *itemsToShare = @[textToShare, [imagesArray objectAtIndex:afImgViewer.currentImage]]; UIActivityViewController *activityVC = [[UIActivityViewController alloc] initWithActivityItems:itemsToShare

UIActivityViewController With Alternate Filename?

≡放荡痞女 提交于 2019-12-12 06:48:52
问题 I am sharing an audio recording via the UIActivityViewController. When the audio file shares via email or iMessage, it shows the underlying name of the audio file without any apparent way of changing it. NSArray *activityItems = [NSArray arrayWithObjects:self.audioPlayer.url, nil]; UIActivityViewController *avc = [[UIActivityViewController alloc] initWithActivityItems:activityItems applicationActivities:nil]; [self presentViewController:avc animated:YES completion:nil]; If I don't use the

UIActivity won't show image?

旧街凉风 提交于 2019-12-11 22:04:22
问题 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 need to be 0% for the "antenna and waves"? (icon size is 59x59 for iOS 7) 回答1: Your suggestion is correct, there should be alpha 0, exactly 0. for "anenna and waves". Also blue background for your icon is senseless - images for UIActivity has always

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

UIActivity and AVAsset data type usage

孤者浪人 提交于 2019-12-11 09:28:30
问题 According to the UIActivity Class documentation it is possible to add AVAsset objects as a datasource to UIActivityTypePostToFacebook activity. Does it mean that we can post videos using the standard UIActivityTypePostToFacebook activity type? If not then what kind of items can I post using AVAsset activity item? 回答1: Well.. According to UIActivity.h UIKIT_EXTERN NSString *const UIActivityTypePostToFacebook NS_AVAILABLE_IOS(6_0); // text, images, URLs UIKIT_EXTERN NSString *const

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

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

iOS: sharing a transparent UIImage w/ UIActivityViewController?

折月煮酒 提交于 2019-12-10 10:56:24
问题 So I am using UIActivityViewController to let users share or save an image they create with my app. I include a UIImage as one of the share items, it all works fine. Except: it is possible to create this image with some transparent areas. And it looks to me like the built-in UIActivities all create JPEG representations of the UIImage, thus losing the transparency. Is there a way to force it to use a PNG representation so as not to lose the alpha channel? 回答1: Without seeing some code it may

UIActivityViewController on iOS 8 show “more” button with custom activities

让人想犯罪 __ 提交于 2019-12-10 03:26:36
问题 Now XCode 6 with iOS 8 SDK is out, we can talk about stuff. I tried to use custom activities with UIActivityViewController on iOS 7, everything worked fine. But on iOS 8, when custom activities are shown, there is "more" button sitting next to them and clicking on this button show exactly the same custom activities. Did anyone find a workaround to remove this button? I couldn't find any solution yet. 回答1: There is nothing to workaround. The "More..." button lets the user reorder the icons.

Override UIActivityViewController default behaviour

痴心易碎 提交于 2019-12-10 03:08:54
问题 In the Photos app on the iPhone, when you select the Mail sharing option, the photo animates into the modal view controller that slides up. How is it possible to modify the behaviour of the built-in UIActivities? For example, I'd like to be able to set the subject field of the mail composer. 回答1: Unfortunately, customizing the subject field of the UIActivityViewController mail composer is not working yet. There is a documented and reported bug regarding trying to customize this discussed here