UIActivityViewController: PostToTwitter: text can´t be changed in presented modal View - twitter

i have a problem with iOS 6´s UIActivityViewController. I want to share an image and a text.
When i share it via Facebook, the text is editable in the modal view. In Twitter, i can't change the text. is there a way to change it for Twitter, so that the text is editable ?
This is my code:
NSArray *activityItems = #[#"Test Text",resultImage];
UIActivityViewController *activityVC = [[UIActivityViewController alloc] initWithActivityItems:activityItems applicationActivities:nil];
activityVC.excludedActivityTypes = #[UIActivityTypeAssignToContact, UIActivityTypePrint, UIActivityTypeCopyToPasteboard,UIActivityTypeMessage,UIActivityTypePostToWeibo];
[self presentViewController:activityVC animated:YES completion:nil];

Related

Change activity items base on which application is selected for sharing in iOS

I share an image with text to othe applications.
NSArray *activityItems = #[title, finalImage];
UIActivityViewController *activityVC = [[UIActivityViewController alloc] initWithActivityItems:activityItems applicationActivities:nil];
activityVC.excludedActivityTypes = #[UIActivityTypeAssignToContact, UIActivityTypePrint, UIActivityTypePostToTwitter, UIActivityTypePostToWeibo];
[self presentViewController:activityVC animated:TRUE completion:nil];
Problem with this code is that I share title and image for all destination apps. but for instance, WhatsApp has problem when I share image with title. When I delete title it will correctly share the image but when I add title to activityItems, it just sends title. I want to detect if whats app is selected and then just send the image

iOS share sheet scale modification

I'm writing my app on iOS 9.3. However, my app's share sheet screen is bigger than the other app's share sheet screen. Is there any way to modify the share sheet screen to the iPhone original icons size?
Following are my code:
- (IBAction)onShareButtonClick:(UIButton *)sender {
NSString *string = #"Upload Chart";
UIImage *uploadImage = [self.selectedController performSelector:#selector(getUploadImage)];
UIActivityViewController *activityVC = [[UIActivityViewController alloc] initWithActivityItems:#[string, uploadImage] applicationActivities:nil];
[self presentViewController:activityVC animated:YES completion:nil];}
As the comment below, I found that getUploadImage is only getting the part of the screen.
if I modify the code as follow, the share sheet would be only "more more" instead. However, the size of the share icon is the same as the origin.
UIActivityViewController *activityVC = [[UIActivityViewController alloc] initWithActivityItems:activityVC applicationActivities:nil];
Because the activityVC is empty.

UIActivityViewController show in different language

i want to remove or translate 'more' from english to russian.
Controller initiated simply as follows:
UIActivityViewController *activityVC = [[UIActivityViewController alloc] initWithActivityItems:objectsToShare applicationActivities:#[fbAct, vk2Act, okAct, twAct, gpAct, mailAct]];
[self presentViewController:activityVC animated:YES completion:nil];
You can't hide or remove more button according to apple policy
It comes as the default language of iPhone
If u need to change that you can use custom library https://github.com/overshare/overshare-kit

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, UIActivityTypePostToFacebook, UIActivityTypePostToTwitter, UIActivityTypeMail, UIActivityTypeMessage, UIActivityTypePrint] applicationActivities:nil];
[self presentViewController:activityVC animated:YES completion:nil];
But when its presented, this is how it looks.
None of the activity types I added in the array shows up. Why is this happening? Am I missing something? I'd like some help to get this working. I especially need the Facebook, twitter sharing and the saving to the local storage options here.
Thank you.
Edit: I checked on a real device and the Facebook and Twitter sharing options show up. However UIActivityTypeSaveToCameraRoll, UIActivityTypePrint still aren't showing up.
The Items will show up only if you have integrated them to your Device.
If you have integrated facebook and Logged into facebook in the settings then Facebook will appear along the Items. That means your device must be Synchronised with the native Facebook, Twitter, etc Apps for them to show up in the UIActivityViewController
Edit:
Try using like this
UIActivityViewController *ActivityView;
ActivityView =
[[UIActivityViewController alloc]
initWithActivityItems:Items applicationActivities:nil];
[self presentViewController:ActivityView animated:YES completion:nil];

Recreate/Use the default iPhone Photo app save menu

I want to save a photo with the same options given by the default iPhone photo app as seen in this picture:
You can do this using UIActivityViewController. You can create a UIActivityViewController, pass it an image, or the URL to an image, and optionally tell it to exclude certain activities that you don't want to appear. Then, present it, as you would any other viewController.
UIActivityViewController *activityViewController = [[UIActivityViewController alloc] initWithActivityItems:#[ myImage ] applicationActivities:nil];
activityViewController.excludedActivityTypes = #[ UIActivityTypeAssignToContact ];
activityViewController.completionHandler = ^(NSString *activityType, BOOL completed){
// handle completion
};
[self presentViewController:activityViewController animated:YES completion:nil];
Check out the documentation for more info.

Resources