我有这个方法来打开我的视图控制器中的照相库/相机。但是当我调用它(模拟器和设备)时没有任何反应。我已经实现了委托方法。无错误/警告。我漏掉了什么吗?
- (IBAction) doButton {
UIImagePickerController *picker = [[UIImagePickerController alloc] init];
picker.delegate = self;
picker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
picker.allowsEditing = YES;
[self.navigationController presentModalViewController:picker animated:YES];
}发布于 2010-09-15 02:36:05
你不应该直接调用[self presentModalViewController:picker animated:YES];
https://stackoverflow.com/questions/3711772
复制相似问题