1

我的应用程序正在运行potrate模式,但我想以横向模式录制视频。如何强制UIImagePickerController以横向模式录制视频

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

请指导我如何做到这一点。

回答

0

正如Apple文档所述,UIImagePickerController(从现在开始将被称为UIIPC)仅适用于纵向模式。你的应用将被拒绝。无论如何,你可以尝试这个以横向模式打开的url

+0

你确定吗? –

相关问题