0

カメラモード機能に関するアプリケーションを実装していますが、アプリは横向きでのみ実行されますが、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;

}
4

1 に答える 1

0

向きを次のように設定します。

 - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
    return (interfaceOrientation == UIInterfaceOrientationLandscapeRight || interfaceOrientation == UIInterfaceOrientationLandscapeLeft);
}
于 2013-02-18T06:21:25.147 に答える