uiactivityviewcontroller

iOS 7 Navigationbar background image issue

╄→гoц情女王★ 提交于 2019-12-13 12:12:59
问题 I am using Image as Navigation bar background Image. To set Image I used following code: [[UINavigationBar appearance] setBackgroundImage:[UIImage imageNamed:@"nav_logo_ios7.png"] forBarMetrics:UIBarMetricsDefault]; For iOS7 "nav_logo_ios7.png" image size is 768x64 and for iOS6 and bellow I used image has size 768x44. This is working well on all UIViewControllers . In same project I am using UIActivityViewController . On iOS7 mail compose view look like this: How I can handle this? Thanks in

UIImageView content is not shared [duplicate]

£可爱£侵袭症+ 提交于 2019-12-13 09:18:16
问题 This question already has answers here : CIFilter output image nil (2 answers) Closed 4 months ago . I have this piece of code in my app guard let codeImage = imgQRCode.image else { return } PHPhotoLibrary.requestAuthorization({status in DispatchQueue.main.async { if status == .authorized { let ac = UIActivityViewController(activityItems: [codeImage], applicationActivities: nil) self.present(ac, animated: true, completion: nil) } else { self.showOkAlert(messageTitle: "Access not granted",

Can you set the text based on the application user chooses to share with UIActivityViewController?

戏子无情 提交于 2019-12-13 07:22:10
问题 So for example, if the user wants to share with twitter, the text would be different than if a user chooses to share with email. How would I code that with initWithActivityItems?: UIActivityViewController *activityVC = [[UIActivityViewController alloc] initWithActivityItems:objectsToShare applicationActivities:nil]; 回答1: Instead of objectsToShare , supply an object that adopts the UIActivityItemSource protocol. This protocol means your object will be called with activityViewController

Sending custom data via UIActivityViewController

风流意气都作罢 提交于 2019-12-13 06:43:51
问题 Im trying to send data (NSData) from my app on one iOS Device to another via AirDrop using the UIActivityViewController. I have created a new CSM (custom data type) in my apps plist. The public.filename-extension = ppm. So how do I add the ppm extension to the NSDate object I'm trying to send ?? Am I right in thinking that when a you present a UIActivityViewController, my apps Icon will not be displayed in the UIActivityViewController window if the object Im sending does not have my apps

Can't share text to fb messenger using UIActivityViewController

这一生的挚爱 提交于 2019-12-12 20:09:14
问题 I can share text to whatsapp/message app using NSString* text=@"I am sharing this text"; NSArray* sharedArray=@[text]; UIActivityViewController * activityVC=[[UIActivityViewController alloc]initWithActivityItems:sharedArray applicationActivities:nil]; dispatch_async(dispatch_get_main_queue(), ^{ // code here [self presentViewController:activityVC animated:YES completion:nil];//:activityVC animated:YES]; }); BUt the facebook messenger option is missing when I use this piece of code. I have to

UIActivityViewController reports “Remote compose controller timed out”

怎甘沉沦 提交于 2019-12-12 15:08:18
问题 I get this in the Xcode console when tapping on my App's share via Message: The Mail one works perfectly fine however. The Message controller never displays obviously, which makes this annoying in a shipped app. Remote compose controller timed out (YES)! Is this an Apple bug? It only started to happen today. Code: if(SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"6.0")) { NSString *textToShare = [NSString stringWithFormat:@"test"]; NSArray *activityItems = [[NSArray alloc] initWithObjects

iOS 8 - Disable iCloud Photo Sharing Activity

你说的曾经没有我的故事 提交于 2019-12-12 07:56:47
问题 Apparently iOS8 by default adds a "iCloud Photo Sharing" activity to activity views in iOS8 and I haven't found any useful documentation regarding it, especially how to explicitly remove it (going into the "More" option allows the user to toggle showing/hiding it, but for our app we want to completely disallow this option). Has anyone figured anything out about how to disable this? Any input would be appreciated. Thanks! 回答1: If you init your UIActivityViewController with full of images,

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

Apple Mach-O Linker error (APActivityIcon)

旧巷老猫 提交于 2019-12-12 02:33:01
问题 I've a problem! Sorry I'm new to programming and I dont know what to do. I implemented some code, to customize my ActivitiViewController. I created a new class, which I linked to my code: - (IBAction)share:(id)sender { Class avcClass = NSClassFromString(@"UIActivityViewController"); if (avcClass) { APActivityProvider *ActivityProvider = [[APActivityProvider alloc] init]; UIImage *ImageAtt = [UIImage imageNamed:@"MyApp Icon 512x512.png"]; NSArray *Items = @[ActivityProvider, ImageAtt];

How to know which icon is clicked in UIActivityViewController before activityController setCompletionHandleris called?

时间秒杀一切 提交于 2019-12-12 01:36:11
问题 How to know which icon is clicked in UIActivityViewController before activityController setCompletionHandler:^(NSString *activityType, BOOL completed) is called ? I want to share different text for sharing with twitter and facebook. -(IBAction)btnSharePressedFromOffersDetail:(id)sender { NSString *posturl= @"facebook or twitter"; UISimpleTextPrintFormatter *printData = [[UISimpleTextPrintFormatter alloc]init]; NSArray *Itemsarray=@[posturl,printData]; UIActivityViewController