Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // How to manage the image asynchronously from a UIImagePickerController
- - (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info
- {
- // hide UIImagePickerController
- [picker dismissViewControllerAnimated:YES completion:^{
- dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 1 * NSEC_PER_SEC), dispatch_get_current_queue(), ^{
- dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_LOW, 0), ^{
- UIImage *originalImage = [info objectForKey:UIImagePickerControllerOriginalImage];
- if (photo) {
- // TODO: you code here....
- }
- });
- });
- }];
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement