我有这段代码:
+ (UIImage*) someImageMethod:(UIImage*)originalImage {
UIImageView *tempImageView = [[UIImageView alloc] initWithImage:originalImage];
UIGraphicsBeginImageContext(tempImageView.frame.size);
CGContextRef context = UIGraphicsGetCurrentContext();
...
[tempImageView.layer renderInContext:context];
...
}
这会生成持续警告:No '-RenderInContext' method found.
为什么会出现这样的错误?我怎么能让它消失?
答案 0 :(得分:4)
确保 #import <QuartzCore/QuartzCore.h>
,并将框架添加到您的项目中。