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:^{}];
答案 0 :(得分:1)
您应该继承UIActivityItemProvider或创建符合UIActivityItemSource的对象。传入一组数组,并根据activityViewController:itemForActivityType:
调用中选择的活动返回一些nil。