Because Qbimagepickercontroller uses the alassetslibrary way to read the picture, if the default way to execute, then according to the URL read asset will be empty, this time we need special processing
1 [Self.assetslibrary Assetforurl:selectedasseturl2resultblock:^ (Alasset *Asset) {3 //ADD Asset4 5 //Normal Photo mode6 if(asset) {7 [Assets Addobject:asset];8 //Check If the loading finished9 if(Assets.count = =weakSelf.selectedAssetURLs.count) {Ten //Delegate One if(self.)Delegate&& [Self.Delegaterespondstoselector: @selector (imagepickercontroller:didselectassets:)]) { A[Self.Delegateimagepickercontroller:self didselectassets:[assets Copy]]; - } - } the } - //Photo Stream Mode - Else{ - //How to handle photo streams +[Self.assetslibrary enumerategroupswithtypes:alassetsgroupphotostream usingblock:^ (ALAssetsGroup *group, BOOL *stop) - { +[Group Enumerateassetswithoptions:nsenumerationreverse usingblock:^ (Alasset *result, Nsuinteger index, BOOL *stop) { A at if([Result.defaultRepresentation.url Isequal:selectedasseturl]) { - [Assets Addobject:result]; -*stop =YES; - //Check If the loading finished - if(Assets.count = =weakSelf.selectedAssetURLs.count) { - //Delegate in if(self.)Delegate&& [Self.Delegaterespondstoselector: @selector (imagepickercontroller:didselectassets:)]) { -[Self.Delegateimagepickercontroller:self didselectassets:[assets Copy]]; to } + } - } the }]; *} failureblock:^ (Nserror *error) { $Ddlogverbose (@"Cann ' t found asset from stream:%@", [Error localizeddescription]);Panax Notoginseng }]; - the } +} failureblock:^ (Nserror *error) { ANSLog (@"Error:%@", [Error localizeddescription]); the}];
Qbimagepickercontroller photos in photo Stream are not selectable