我正在将iOS4项目中的一段代码移植到iOS5中,但我在使用ARC时遇到了一些问题。代码从屏幕截图生成PDF。
PDF生成代码
UIView *captureView;
...
NSMutableData *pdfData = [NSMutableData data];
UIGraphicsBeginPDFContextToData(pdfData, captureView.bounds, nil);
UIGraphicsBeginPDFPage();
CGContextRef pdfContext = UIGraphicsGetCurrentContext();
[captureView.layer renderInContext:pdfContext];
UIGraphicsEndPDFContext();
renderInContext系列
[captureView.layer renderInContext:pdfContext];
生成以下错误。
Automatic Reference Counting issue
Receiver type 'CALayer' for instance message is a forward declaration
你知道这是怎么回事吗?
https://stackoverflow.com/questions/7813379
复制相似问题