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 文档所述,UIImagePickerController(从现在起将被称为 UIIPC)仅在纵向模式下工作。您的应用程序将被拒绝。无论如何,你可以试试这个以横向模式打开的url 。

于 2012-05-23T14:29:22.067 回答