Capture iPhone Screen From My App and record Video

前端 未结 4 1474
庸人自扰
庸人自扰 2021-01-28 03:59

I am just curious to create an app which records video of iphone screen or capture images of iphone screen. I know that Apple doesn\'t allow such kinds of apps on the app store

4条回答
  •  失恋的感觉
    2021-01-28 04:28

    hi you can take screenShot using this code..

    UIGraphicsBeginImageContext(self.view.window.frame.size);
        [BackView.layer renderInContext:UIGraphicsGetCurrentContext()];
    
    UIImage *viewImage = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();
    UIImageWriteToSavedPhotosAlbum(viewImage, nil, nil, nil);
    

提交回复
热议问题