aboutsummaryrefslogtreecommitdiffstats
path: root/Video Tuneup/ViewController.m
diff options
context:
space:
mode:
authorTeddy Wing2012-04-17 00:42:28 -0400
committerTeddy Wing2012-04-17 00:42:28 -0400
commit33f1899fcb0619418d15da2009e6d2ffbf2a5688 (patch)
tree72372c42c7bdc53112d1ddb5d86174a7460def96 /Video Tuneup/ViewController.m
parentc24b41c69846727f0c4907949a60df77dcd33596 (diff)
downloadVideo-Tuneup-33f1899fcb0619418d15da2009e6d2ffbf2a5688.tar.bz2
Implemented UIImagePickerController Delegate method. Trying to get chosen video's NSURL, but having issues.
* BUG: after clicking the 'Use' button, a progress bar appears saying "Compressing video...", but then the app seems to stall. What happens on an actual device?
Diffstat (limited to 'Video Tuneup/ViewController.m')
-rw-r--r--Video Tuneup/ViewController.m11
1 files changed, 10 insertions, 1 deletions
diff --git a/Video Tuneup/ViewController.m b/Video Tuneup/ViewController.m
index e26af47..972bcce 100644
--- a/Video Tuneup/ViewController.m
+++ b/Video Tuneup/ViewController.m
@@ -405,7 +405,7 @@ mScrubber, mediaLibraryButton, mediaLibraryPopover;
UIButton *theButton = (UIButton *)sender;
UIImagePickerController* picker = [[UIImagePickerController alloc] init];
- //picker.delegate = self;
+ picker.delegate = self;
picker.sourceType = UIImagePickerControllerSourceTypeSavedPhotosAlbum;
picker.mediaTypes = [UIImagePickerController availableMediaTypesForSourceType:picker.sourceType];
mediaLibraryPopover = [[UIPopoverController alloc] initWithContentViewController:picker];
@@ -413,6 +413,15 @@ mScrubber, mediaLibraryButton, mediaLibraryPopover;
}
+- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info {
+ [mediaLibraryPopover dismissPopoverAnimated:YES];
+
+ NSLog(@"MEDIA URL:");
+ NSLog(@"%@", [info objectForKey:UIImagePickerControllerMediaURL]);
+ NSLog(@"MEDIA REFERENCE URL:");
+ NSLog(@"%@", [info objectForKey:UIImagePickerControllerReferenceURL]);
+}
+
#pragma mark - View controller boilerplate
- (void)didReceiveMemoryWarning {