uiactivity

UIActivityViewController - Email and Twitter sharing

这一生的挚爱 提交于 2019-11-27 05:09:57
问题 I recently started working with UIActivity to share my app to the world, but I have few problems. First, I didn't find how to set the subject of my email. Is there any way? Second, when I set the body text of my email, there is a extra "enter" (first line of the email is blank and my text starts at the second line). Here's the code: NSMutableArray *array = [[NSMutableArray alloc] initWithObjects: @"Test", nil]; UIActivityViewController *activityViewController = [[UIActivityViewController

Problems adding custom activity to UIActivityController

让人想犯罪 __ 提交于 2019-11-27 03:27:48
问题 I am trying to implement a custom activity to the standard activities (Print, Mail, FaceBook, etc.) but for now only want the standard Print (for AirPrint) and my own custom printing by a direct method. I am obviously missing something fundamental as none of the methods in my custom class ever get called. For now I only have some NSLog statement to figure out the calling sequence, and to get the framework to function. The following is my test code for the custom activity class: //

UIActivityViewController with custom UIActivity displays color image as gray

人盡茶涼 提交于 2019-11-26 21:48:04
问题 I created a custom UIActivity to display in a share sheet. I created an 60x60 icon (png file) in full color, but when it's displayed it only shows the outline in gray. I don't see what I've written incorrectly. I hope someone sees what I've missed. Any help will be greatly appreciated. Here is my code... @implementation MyActivity #pragma mark - Overrides - (NSString *)activityType { return @"MyType"; } - (NSString *)activityTitle { return @"ShareMe"; } - (UIImage *)activityImage { return

How to exclude Notes and Reminders apps from the UIActivityViewController?

本秂侑毒 提交于 2019-11-26 06:29:46
问题 I am creating a UIActivityViewController and pass String and URL to it. This, obviously, configures the UIActivityViewController to use some items which I want to exclude (my objective is to share the info about my app). I have managed to exclude lots of system provided activities (like \'Add to Reading list\') by setting the appropriate excludedActivityTypes . However, I am unable to exclude Reminders and Notes apps. Can someone suggest a way of doing it? These apps appear 3rd and 4th on the

How can I create a custom UIActivity in iOS?

本小妞迷上赌 提交于 2019-11-26 00:50:07
问题 How can I create a custom UIActivity in iOS? The reason I want this is to add a Review App button in one of my apps that takes the user to the review section in the App Store. How can I create such a custom UIActivity ? 回答1: First, create the files. I chose to name mine ActivityViewCustomActivity Make ActivityViewCustomActivity.h look like this: #import <UIKit/UIKit.h> @interface ActivityViewCustomActivity : UIActivity @end Make ActivityViewCustomActivity.m look like this: #import