我刚下载了新的XCode并构建了我的应用程序,其中包含自定义标签栏图。
我遇到了很多错误:
<Error>: CGContextSetFillColorWithColor: invalid context 0x0
<Error>: CGContextSetStrokeColorWithColor: invalid context 0x0
<Error>: CGContextGetCompositeOperation: invalid context 0x0
<Error>: CGContextSetCompositeOperation: invalid context 0x0
<Error>: CGContextFillRects: invalid context 0x0
<Error>: CGContextSetCompositeOperation: invalid context 0x0
<Error>: CGContextSetRGBFillColor: invalid context 0x0
<Error>: CGContextFillRects: invalid context 0x0
等等。我该如何解决?我的应用程序也没有启动。
答案 0 :(得分:0)
你确定,你在做什么吗
- (void)drawRect:(CGRect)rect
{
NSLog(@"##### DRAW RECT #####");
[super drawRect:rect];
CGContextRef context = UIGraphicsGetCurrentContext(); // This is important string
// Drawing code
}