Commit 1a19ea78 authored by 林生雨's avatar 林生雨

commit

parent c78ddd69
This diff is collapsed.
......@@ -223,6 +223,11 @@ class AlbumModel {
} else {
iosAlbum(_selectList, context, (value) {
print(value);
// iosAlbum(_selectList, context, (image) {
// iosAlbum(_selectList, context, (video) {
// print("IM $image VIDEI ${video}");
// });
// });
Navigator.pop(context, List<String>.from(value)[0]);
});
}
......
......@@ -230,6 +230,12 @@ NSString *cacheDirectory;
if(path!=nil){
dispatch_async(queue, ^{
[self.channelList removeAllObjects];
if(path.count==0){
dispatch_async(dispatch_get_main_queue(), ^{
[[ResultManager sharedSingleton] resultSuccess:[NSNumber numberWithLong:resultTemp] :self.channelList];
});
return ;
}
self.channelSize=0;
self.channelAllSize=path.count;
PHVideoRequestOptions *options = [[PHVideoRequestOptions alloc] init];
......@@ -261,7 +267,6 @@ NSString *cacheDirectory;
}];
}else{
if([fileManager fileExistsAtPath:tempTake]){
NSLog(@"1111");
self.channelSize++;
[self.channelList addObject:[NSString stringWithFormat:@"%@",tempTake]];
if(self.channelSize==self.channelAllSize){
......@@ -270,7 +275,6 @@ NSString *cacheDirectory;
});
}
}else{
NSLog(@"222");
int picWidth=[assets pixelWidth];
int picHeight=[assets pixelHeight];
float tempScareSize=1;
......@@ -282,13 +286,12 @@ NSString *cacheDirectory;
CGSize temp=CGSizeMake(picWidth*tempScareSize, picHeight*tempScareSize);
[[PHImageManager defaultManager] requestImageForAsset:assets targetSize:temp contentMode:PHImageContentModeDefault options:imageRequestOption resultHandler:^(UIImage * _Nullable res, NSDictionary * _Nullable info) {
// @autoreleasepool{
NSLog(@"33333");
NSData *data = UIImageJPEGRepresentation(res, 0.8) ;
[data writeToFile:tempTake atomically:YES];
data=nil;
res=nil;
// }
@autoreleasepool{
NSData *data = UIImageJPEGRepresentation(res, 0.8) ;
[data writeToFile:tempTake atomically:YES];
data=nil;
res=nil;
}
self.channelSize++;
[self.channelList addObject:[NSString stringWithFormat:@"%@",tempTake]];
if(self.channelSize==self.channelAllSize){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment