Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/objective-c/25.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Objective c IPad摄像头定位问题_Objective C_Ipad_Ios5_Ios6_Camera - Fatal编程技术网

Objective c 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.

我正在实现一个关于摄像头模式功能的应用程序,但应用程序只运行横向,但摄像头在IPad的某些部分打开,剩下的部分是黑色的

    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…
方法,直到不能全屏打开摄像头!!!!