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

相關文章
相關標籤/搜索