ios - Objects must be of type PHAsset -


i use code delete images photos app selected image picker. after selecting multiple images return selected image in assetarray. want delete images,but give error "object must of type phasset"

 - (void)assetspickercontroller:(gmimagepickercontroller *)picker didfinishpickingassets:(nsarray *)assetarray      {       [picker.presentingviewcontroller dismissviewcontrolleranimated:yes completion:nil]; nslog(@"===%@===",assetarray); void (^completionhandler)(bool, nserror *) = ^(bool success, nserror *error) {     if (success) {         dispatch_async(dispatch_get_main_queue(), ^{             [[self navigationcontroller] popviewcontrolleranimated:yes];         });     } else {         nslog(@"error: %@", error);     } };     // delete asset library       [[phphotolibrary sharedphotolibrary] performchanges:^{       [phassetchangerequest deleteassets:@[assetarray]]; } completionhandler:completionhandler];    nslog(@"gmimagepicker: user ended picking assets. number of selected items is: %lu", (unsigned long)assetarray.count); } 

you made array of array.just this:

[phassetchangerequest deleteassets:assetarray]; 

Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -