Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
D
dz_TZImagePickerController
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
shuijing
dz_TZImagePickerController
Commits
83b8f6b2
Commit
83b8f6b2
authored
May 14, 2018
by
yuzheng.tz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
加入获取原图的示例
parent
1c22b435
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
0 deletions
+19
-0
TZImagePickerController/ViewController.m
TZImagePickerController/ViewController.m
+19
-0
No files found.
TZImagePickerController/ViewController.m
View file @
83b8f6b2
...
@@ -512,6 +512,25 @@
...
@@ -512,6 +512,25 @@
NSLog
(
@"location:%@"
,
phAsset
.
location
);
NSLog
(
@"location:%@"
,
phAsset
.
location
);
}
}
}
}
/*
// 3. 获取原图的示例,这样一次性获取很可能会导致内存飙升,建议获取1-2张,消费和释放掉,再获取剩下的
__block NSMutableArray *originalPhotos = [NSMutableArray array];
__block NSInteger finishCount = 0;
for (NSInteger i = 0; i < assets.count; i++) {
[originalPhotos addObject:@1];
}
for (NSInteger i = 0; i < assets.count; i++) {
PHAsset *asset = assets[i];
[[TZImageManager manager] getOriginalPhotoWithAsset:asset completion:^(UIImage *photo, NSDictionary *info) {
finishCount += 1;
[originalPhotos replaceObjectAtIndex:i withObject:photo];
if (finishCount >= assets.count) {
NSLog(@"All finished.");
}
}];
}
*/
}
}
// If user picking a video, this callback will be called.
// If user picking a video, this callback will be called.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment