I am using UIImage Picker but the delegate is not called.
- (IBAction)captureVideo:(id)sender {
self.imgPicker = [[UIImagePickerController alloc] init];
self.imgPicker.allowsImageEditing = YES;
self.imgPicker.delegate = self;
/* if we want from the library*/
self.imgPicker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
self.imgPicker.mediaTypes = [[NSArray alloc] initWithObjects: (NSString *) kUTTypeMovie, nil];
[self performSelector:@selector(takePicture) withObject:self afterDelay:1.0];
// I added that after an answer I san on SO
}
-(void) takePicture
{
[self presentModalViewController:self.imgPicker animated:YES];
}
- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingImage:(UIImage *)img editingInfo:(NSDictionary *)info {
NSLog(@"Video chosen");
}
I added the delay as I saw in here.
I am running on a device.