图像捕获无法使用iOS 7
我有两个视图控制器RootViewController和CameraViewController。 在CameraViewController中:图像捕获无法使用iOS 7,ios,iphone,ios7,uiimagepickercontroller,Ios,Iphone,Ios7,Uiimagepickercontroller,我有两个视图控制器RootViewController和CameraViewController。 在CameraViewController中: - (IBAction) takePhoto: (id) sender { [root.camera takePicture]; } 这里的“root”是RootViewController的实例,“camera”是UIImagePickerController的实例&“takePicture”是iOS捕获图像的默认方法。已设置UIImage
- (IBAction) takePhoto: (id) sender
{
[root.camera takePicture];
}
这里的“root”是RootViewController的实例,“camera”是UIImagePickerController的实例&“takePicture”是iOS捕获图像的默认方法。已设置UIImagePickerController的其他委托方法。但问题是,这次活动没有拍照!我不明白问题出在哪里。提前感谢您的帮助。据我所知,您应该先出示相机,然后按照以下步骤拍照:
[self presentViewController:root.camera animated:YES completion:^{
[root.camera takePicture];
}];
请注意,您需要在代理方法中关闭摄影机。摄影机是显示的,还是保持不可见?检查更新的答案