@property (nonatomic, weak) UIImageView *imageView; @property (nonatomic, weak) NJImageView *njIv; @end @implementation NJViewController - (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view, typically from a ni…
iOS开发UI篇—Quartz2D使用(截屏) 一.简单说明 在程序开发中,有时候需要截取屏幕上的某一块内容,比如捕鱼达人游戏.如图: 完成截屏功能的核心代码:- (void)renderInContext:(CGContextRef)ctx;调用某个view的layer的renderInContext:方法即可 二.代码示例 storyboard界面搭建: 代码: // // YYViewController.m // 01-截屏 // // Created by apple on 14-6-…