1

私のアプリケーションはpotrateモードを実行していますが、横向きモードでビデオを録画したいと思います。

    self.imgPicker = [[UIImagePickerController alloc] init];
        self.imgPicker.editing=FALSE;
        //self.imgPicker.allowsImageEditing = YES;
        self.imgPicker.delegate = (id)self;

        [self.imgPicker shouldAutorotateToInterfaceOrientation: UIInterfaceOrientationLandscapeRight];
        //self.imgPicker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
    #if !(TARGET_IPHONE_SIMULATOR)    
        self.imgPicker.sourceType = UIImagePickerControllerSourceTypeCamera;
    #endif
imgPicker.sourceType=UIImagePickerControllerSourceTypePhotoLibrary;
            NSArray *mediaTypesAllowed = [NSArray arrayWithObject:@"public.movie"];
            [imgPicker setMediaTypes:mediaTypesAllowed];
            [self.imgPicker shouldAutorotateToInterfaceOrientation: UIInterfaceOrientationLandscapeRight];
            [self presentModalViewController:imgPicker animated:YES];

UIImagePickerControllerデフォルトでランドスケープモードでロードしたい。

同じ方法を教えてください。

4

1 に答える 1

0

Apple doc が述べているように、UIImagePickerController (今後は UIIPC と呼ばれます) は縦向きモードでのみ機能します。あなたのアプリは拒否されます。とにかく、横向きモードで開くこのURLを試すことができます。

于 2012-05-23T14:29:22.067 に答える