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

你確定嗎? –

相關問題