English 中文(简体)
如何通过目标c在电话中使用默认视频应用
原标题:how to use default video application in iphone through objective c
  • 时间:2011-01-24 12:41:56
  •  标签:
  • iphone
  • video

how to use default video application in iphone through objective c. I want to used default video application of iphone in my application as I have already used default camera before but facing issues for video.

最佳回答

在您的项目中增加流动服务框架

Add #import <MobileCoreServices/UTCoreTypes.h> to the header file where you will reference the picker. Alternately, you can add the import to your precompiled header file (.pch) so the UTCoreTypes constants are available throughout the project.

现在,在发出<代码>之前 UIImagePickerController, only set the media 电影类型:kUTTypeMovie。 或者,如果你只想显示照片,你将使用<条码>kUTTypeImage:

myImagePickerController.mediaTypes =  
 [NSArray arrayWithObject:(NSString *)kUTTypeMovie];

不要忘记,在确定来源Type之前,如果该装置支持录像,那么,在不支持录像的装置上将其放置在电影类型上,就会造成各种混乱。 你们通过研究现有的来源类型来做到这一点:

NSArray *sourceTypes = [UIImagePickerController availableMediaTypesForSourceType:myImagePickerController.sourceType];
if (![sourceTypes containsObject:(NSString *)kUTTypeMovie ]){
   // no movie type supported...add code to handle that here.
}
问题回答

页: 1

利用密码拍摄录像机



UIImagePickerController *imagePicker = [[UIImagePickerController alloc] init]; imagePicker.delegate = self; if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera]) {
imagePicker.mediaTypes =[UIImagePickerController availableMediaTypesForSourceType:UIImagePickerControllerSourceTypeCamera]; imagePicker.cameraCaptureMode=UIImagePickerControllerCameraCaptureModeVideo;

} [self presentModalViewController:imagePicker animated:YES];

} else { UIAlertView *alert=[[UIAlertView alloc]initWithTitle:@"Error" message:@"No Camera Device" delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil]; [alert show]; [alert release]; }





相关问题
Code sign Error

I have created a new iPhone application.I have two mach machines. I have created the certificate for running application in iPhone in one mac. Can I use the other mac for running the application in ...

ABPersonViewController Usage for displaying contact

Created a View based Project and added a contact to the AddressBook using ABAddressBookRef,ABRecordRef now i wanted to display the added contact ABPersonViewController is the method but how to use in ...

将音频Clips从Peter改为服务器

我不禁要问,那里是否有任何实例表明从Peit向服务器发送音响。 I m不关心电话或SIP风格的解决办法,只是一个简单的袖珍流程......

• 如何将搜查线重新定位?

我正试图把图像放在搜索条左边。 但是,问题始于这里,搜索条线不能重新布署。

热门标签