【发布时间】:2012-06-14 01:47:48
【问题描述】:
我刚刚开始发布核心图形,所以我可能需要一点帮助。
我的代码如下所示:
UIImage *buttonImage() {
UIGraphicsBeginImageContextWithOptions(bounds.size, NO, 0);
CGContextRef context = UIGraphicsGetCurrentContext();
CGColorSpaceRef baseSpace = CGColorSpaceCreateDeviceRGB();
CGMutablePathRef outerPath;
CGMutablePathRef midPath;
CGMutablePathRef innerPath;
CGMutablePathRef highlightPath;
//Some button stuff
UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
CGContextRelease(context);
return image;
}
那个发布行,我已经输入了。但是我遇到了一个错误:
context_reclaim: invalid context
context_finalize: invalid context
关于在这种情况下我应该将版本放在哪里有什么想法吗?
【问题讨论】:
标签: iphone objective-c ios core-graphics drawrect