els*_*ooo 47
#import "QuartzCore/QuartzCore.h"将框架添加到项目后.然后做:
UIGraphicsBeginImageContext(yourView.frame.size);
[[yourView layer] renderInContext:UIGraphicsGetCurrentContext()];
UIImage *screenshot = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
// The result is *screenshot
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
12488 次 |
| 最近记录: |