From ac1adcb19b207ab93a1ca98be2e980a2359d9fb1 Mon Sep 17 00:00:00 2001 From: Artwalk Date: Sun, 24 Aug 2014 22:11:50 +0800 Subject: [PATCH] fixed: crash when click the 'Use Video' button Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFConstantString isFileURL]: unrecognized selector sent to instance --- .../Taking Videos with the Camera/ViewController.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ios-7-programming-cookbook-source-codes-master/Chapter 15/Taking Videos with the Camera/Taking Videos with the Camera/ViewController.m b/ios-7-programming-cookbook-source-codes-master/Chapter 15/Taking Videos with the Camera/Taking Videos with the Camera/ViewController.m index 9d600bf..4ed8d45 100644 --- a/ios-7-programming-cookbook-source-codes-master/Chapter 15/Taking Videos with the Camera/Taking Videos with the Camera/ViewController.m +++ b/ios-7-programming-cookbook-source-codes-master/Chapter 15/Taking Videos with the Camera/Taking Videos with the Camera/ViewController.m @@ -70,7 +70,7 @@ - (void) imagePickerController:(UIImagePickerController *)picker if ([mediaType isEqualToString:(__bridge NSString *)kUTTypeMovie]){ - NSURL *urlOfVideo = info[UIImagePickerControllerMediaType]; + NSURL *urlOfVideo = info[UIImagePickerControllerMediaURL]; NSLog(@"Video URL = %@", urlOfVideo);