iPhone开发中怎么实现截屏

- (UIImage *)capture it

{ io

UIGraphicsBeginImageContextWithOptions(self.view.bounds.size, self.view.opaque, 0.0); im

    [self.view.layer renderInContext:UIGraphicsGetCurrentContext()]; img

UIImage * img = UIGraphicsGetImageFromCurrentImageContext();    UIGraphicsEndImageContext(); view

    return img; vi

} return

相关文章
相关标签/搜索