Objective c IPad摄像头定位问题
我正在实现一个关于摄像头模式功能的应用程序,但应用程序只运行横向,但摄像头在IPad的某些部分打开,剩下的部分是黑色的Objective c IPad摄像头定位问题,objective-c,ipad,ios5,ios6,camera,Objective C,Ipad,Ios5,Ios6,Camera,我正在实现一个关于摄像头模式功能的应用程序,但应用程序只运行横向,但摄像头在IPad的某些部分打开,剩下的部分是黑色的 if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera]) { camPicker.sourceType = UIImagePickerControllerSourceTypeCamera; camPicker.
if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera]) {
camPicker.sourceType = UIImagePickerControllerSourceTypeCamera;
camPicker.delegate = self;
camPicker.allowsEditing = NO;
[self presentModalViewController:camPicker animated:YES];
对于固定为
if (interfaceOrientation == UIInterfaceOrientationLandscapeLeft) {
return interfaceOrientation == UIInterfaceOrientationLandscapeLeft;
}else
{
return interfaceOrientation == UIInterfaceOrientationLandscapeRight;
}
将方向设置为:
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
return (interfaceOrientation == UIInterfaceOrientationLandscapeRight || interfaceOrientation == UIInterfaceOrientationLandscapeLeft);
}
在iOS 6.x中不使用
shouldAutorotateToInterfaceOrientation…
方法,直到不能全屏打开摄像头!!!!