2013-02-18 4 views
0

Я реализую приложение, относящееся к функциональности режима камеры, но приложение работает только с ландшафтом, но камера открывается в некоторой части оставшегося IPad только в черном.IPad Camera Orientation issue

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; 

} 
+0

До не открыть камеру в полноэкранном режиме !!!! – Byka

ответ

0

Комплект ориентации как:

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation 
{ 
    return (interfaceOrientation == UIInterfaceOrientationLandscapeRight || interfaceOrientation == UIInterfaceOrientationLandscapeLeft); 
} 
+0

Метод 'shouldAutorotateToInterfaceOrientation ...' не используется в iOS 6.x. – rmaddy

+0

ThanQ, но до сих пор работает как ... – Byka