你好,我正在使用一个自动录制视频的应用程序。因为我隐藏了Cameracontrols,所以它没有显示视频的预览。我想知道调用预览视图的方法.. 任何人都可以帮助我.. 感谢
更新
UIImagePickerController *vpicker; // in .h
// place the below code whr u want to satrt video
vpicker=[[UIImagePickerController alloc]init];
vpicker.delegate=self;
vpicker.sourceType=UIImagePickerControllerSourceTypeCamera;
vpicker.mediaTypes=[NSArray arrayWithObject:(NSString *)kUTTypeMovie];
vpicker.showsCameraControls=NO;
vpicker.cameraCaptureMode=UIImagePickerControllerCameraCaptureModeVideo;
BOOL test=[vpicker startVideoCapture];
NSLog(@"test value %d",test);
if(test)
{
NSLog(@"vedio started");
[NSTimer scheduledTimerWithTimeInterval:10.0f target:self selector:@selector(stop) userInfo:nil repeats:NO];
}
else
{
NSLog(@"sorry vedio not started to stop it ...");
}
// in stop method
[vpicker stopVideoCapture];
vpicker.showsCameraControls=YES;
答案 0 :(得分:0)
MPMoviePlayerController用于显示视频,而不是UIImagePickerViewController