录制屏幕参考(录制屏幕 UI元素)
使用AVFoudation
https://github.com/search?l=Objective-C&q=ScreenRecoder&type=Repositories&utf8
预览录制好的视频
MPMoviePlayerViewController *theMovie =[[MPMoviePlayerViewController alloc] initWithContentURL:[NSURL fileURLWithPath:_path]];
[self presentMoviePlayerViewControllerAnimated:theMovie];
theMovie.moviePlayer.movieSourceType = MPMovieSourceTypeFile;
[theMovie.moviePlayer play]
使用ReplayKit录屏
https://github.com/topws/ScreenRecord
录制 摄像头(自定义相机)
http://www.jianshu.com/p/af531ec23c44
#pragma mark 截屏拍照
-(UIImage *)viewSnapshot:(UIView *)view withInRect:(CGRect)rect{
UIGraphicsBeginImageContext(view.bounds.size);
[view.layer renderInContext:UIGraphicsGetCurrentContext()];
UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
image = [UIImage imageWithCGImage:CGImageCreateWithImageInRect(image.CGImage, rect)];
return image;
}