我在 iPhone 3Gs 上使用 iOS 4.2.1 中的 UIImagePickerController。我之前使用过已弃用的方法
- (void)imagePickerController: didFinishPickingImage: editingInfo:
没有问题。我有另一个应用程序在另一个应用程序中使用新的 didFinishPickingMediaWithInfo API,并且一旦选择媒体,选择器就永远不会调用该方法。
//MyViewController.h
@interface MyViewController : UIViewController < UIImagePickerControllerDelegate, UINavigationControllerDelegate>
//MyViewController.m
if([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypePhotoLibrary]) {
UIImagePickerController *picker = [[UIImagePickerController new] autorelease];
picker.delegate = self;
picker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
picker.mediaTypes = [[NSArray alloc] initWithObjects: (NSString *) kUTTypeMovie, nil];
picker.videoQuality = UIImagePickerControllerQualityTypeHigh;
picker.allowsEditing = NO;
[self presentModalViewController:picker animated:TRUE];
}
- (void)imagePickerController:(UIImagePickerController *)picker imagePickerController:didFinishPickingMediaWithInfo:(NSDictionary *)editingInfo{
//**NEVER CALLED**
}
you have
- (void)imagePickerController:(UIImagePickerController *)picker imagePickerController:didFinishPickingMediaWithInfo:(NSDictionary *)editingInfo
你可能想要的地方
- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)