小编Seb*_*Seb的帖子

iOS ARC,接收器类型'CALayer'作为实例消息是前向声明

你好,

当我插入这个:

UIGraphicsBeginImageContext(imageView.bounds.size);
    [imageView.layer renderInContext:UIGraphicsGetCurrentContext()];
    UIImage *img = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();
Run Code Online (Sandbox Code Playgroud)

我在第2行收到此错误:

接收器类型'CALayer'例如消息是前向声明

我知道它与ARC有关,但还有什么选择呢?

iphone uiview automatic-ref-counting

3
推荐指数
1
解决办法
2047
查看次数

标签 统计

automatic-ref-counting ×1

iphone ×1

uiview ×1