开发者

XCode 4 - Warning for - (void)renderInContext:(CGContextRef)ctx

I have this code:

+ (UIImage*) someImageMethod:(UIImage*)originalImage {
    UIImageView *tempImageView = [[UIImageView alloc] initWithImage:originalImage];

    UIGraphicsBeginImageContext(tempImageView.frame.size);
    CGContextRef context = UIGraphicsGetCurrentContext();

    ...    

    [tempImageView.layer renderInContext:context];

 开发者_如何学C   ...    
}

This generates a persistent warning: No '-RenderInContext' method found.

Why such an error? How may I make it disappear?


Be sure you #import <QuartzCore/QuartzCore.h>, and add the framework to your Project.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜