我有一些我想通过 Facebook、twitter 分享的图像和文本,它工作正常,尽管我想与我的自定义 UIActivity 分享另一组数据(活动项)
NSLog(@"The Selected Photo Count %i",[self.selectedPhotos count]);
NSMutableArray *newArray=[[NSMutableArray alloc]init];
NSMutableArray *newArraytext=[[NSMutableArray alloc]init];
for (Shoplog * ChosenPhot in self.selectedPhotos) {
NSString *initalTextString = [NSString
stringWithFormat:@"I am Sending from my Shoplog Collection: %@",
ChosenPhot.categoryname];
[newArraytext addObject:initalTextString];
CreateShoplogTagImage *createimagetag=[[CreateShoplogTagImage alloc]init];
UIImage *newimage=[createimagetag Imagetag:ChosenPhot];
NSDictionary *flurrydicttionary3=[[NSDictionary alloc]initWithObjectsAndKeys:ChosenPhot.categoryname,@"SharedCategoryname", nil];
[Flurry logEvent:@"SharedCatalogue" withParameters:flurrydicttionary3 timed:YES];
[newArray addObject:newimage];
}
NSMutableArray *addArray=[[NSMutableArray alloc]initWithArray:newArray];
[addArray addObjectsFromArray:newArraytext];
UIActivityViewController *activityViewController2 =[[UIActivityViewController alloc]initWithActivityItems:addArray applicationActivities:@[shopactivity]];
[self presentViewController:activityViewController2 animated:YES completion:^{}];