Iphone iOS 7中的UIImagePickerControllerSourceTypePhotoLibrary不工作
当我升级到iOS7时,当我从应用程序访问照片库时,我的应用程序显示一个空的视图控制器。它使用的是较旧的框架Iphone iOS 7中的UIImagePickerControllerSourceTypePhotoLibrary不工作,iphone,objective-c,ios7,Iphone,Objective C,Ios7,当我升级到iOS7时,当我从应用程序访问照片库时,我的应用程序显示一个空的视图控制器。它使用的是较旧的框架 UIImagePickerController *imagePickerController = [[UIImagePickerController alloc] init]; imagePickerController.modalPresentationStyle = UIModalPresentationCurrentContext; imagePickerContr
UIImagePickerController *imagePickerController = [[UIImagePickerController alloc] init];
imagePickerController.modalPresentationStyle = UIModalPresentationCurrentContext;
imagePickerController.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
imagePickerController.delegate = self;
self.imagePicker = imagePickerController;
//self.imagePicker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
[self presentViewController:self.imagePicker animated:YES completion:nil];
请直接使用此代码
UIImagePickerController *imagePickerController = [[UIImagePickerController alloc] init];
imagePickerController.modalPresentationStyle = UIModalPresentationCurrentContext;
imagePickerController.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
imagePickerController.delegate = self;
[self presentViewController:imagePickerController animated:YES completion:nil];
当此代码运行时,“应用程序”将访问您的照片消息,当您单击“确定”时,将显示所有图像
谢谢