iOS-截屏

2015-11-24  本文已影响108人  ten3fang
UIGraphicsBeginImageContextWithOptions(self.view.bounds.size, YES, 0);
[self.view.layer renderInContext:UIGraphicsGetCurrentContext()];
UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();

注:image就是截取的屏幕

上一篇 下一篇

猜你喜欢

热点阅读