uiactivityviewcontroller - Custom UIActivity with custom Data -


i have images & text want share via facebook,twitter ,it works fine , although want share set of data ( activityitems ) custom uiactivity

 nslog(@"the selected photo count %i",[self.selectedphotos count]);  nsmutablearray *newarray=[[nsmutablearray alloc]init]; nsmutablearray *newarraytext=[[nsmutablearray alloc]init];    (shoplog * chosenphot in self.selectedphotos) {      nsstring *initaltextstring = [nsstring                                   stringwithformat:@"i sending 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:^{}]; 

you should subclass uiactivityitemprovider or create objects conform uiactivityitemsource. pass in array of those, , have of them return nil depending on chosen activity in activityviewcontroller:itemforactivitytype: call.


Comments

Popular posts from this blog

.htaccess - First slash is removed after domain when entering a webpage in the browser -

Automatically create pages in phpfox -

c# - Farseer ContactListener is not working -