阅读背景:

解决 CGBitmapContextCreate: unsupported parameter combination 错误

来源:互联网 

苹果再一次调皮了。

- (void)drawRect:(CGRect)dirtyRect
{
    CGRect bounds = [self bounds];
    CGContextRef context = UIGraphicsGetCurrentContext();

    CGColorSpaceRef space = CGColorSpaceCreateDeviceRGB();
    size_t bytesPerRow = 4 * roundf(bounds.size.width);
    context = CGBitmapContextCreate(NULL, roundf(bounds.size.width), roundf(bounds.size.height), 8, bytesPerRow, space, kCGBitmapAlphaInfoMask);

    // ...
}
- (void)drawRect:(CGRect)dirtyRect



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: