-(IBAction)selectPressed:(id)sender
{
UIImagePickerController *picker = [[UIImagePickerController alloc] init];
picker.delegate = self;
picker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
[self presentModalViewController:picker animated:YES];
[picker release];
}
我正在 iPad 和 iPhone 模拟器上测试此代码。在 iPhone 模拟器中(以及在真实的 iPhone 上)没问题 - 会出现图库。但在iPad模拟器上(我没有设备),它崩溃了。有什么想法吗?
请阅读设备日志中的异常消息:
On iPad, UIImagePickerController must be presented via UIPopoverController
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)