0
回答
教你如何用Camera作为你view的背景
利用AWS快速构建适用于生产的无服务器应用程序,免费试用12个月>>>   

用Camera作为你view的背景是不是很cool?其实很简单呀,几行代码解决问题。

This action starts camera as a backgroud of the view:-
-(IBAction)btnStartCamera_TouchUpInside{
 
 picker = [[UIImagePickerController alloc] init];
#if TARGET_IPHONE_SIMULATOR
 picker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
 picker.view = viewCategoryCamera;
#elif TARGET_OS_IPHONE
 picker.sourceType = UIImagePickerControllerSourceTypeCamera;
 picker.showsCameraControls = NO;
 [picker.view addSubview:viewCategoryCamera];
 //picker.cameraOverlayView = viewCamera; 
#endif 
 [self presentModalViewController:picker animated:YES]; 
}
This action stops camera:-
-(IBAction)btnStopCamera_TouchUpInside:(id)sender{
 
 [self dismissModalViewControllerAnimated:YES]; 
 [self.navigationController popToRootViewControllerAnimated:YES];
}
 

 

viewCategoryCamera就是你的view哦。


原文链接:http://blog.csdn.net/favormm/article/details/6573336
<无标签>
举报
长平狐
发帖于5年前 0回/62阅
顶部