我试图在viewDidLoad中简单的圆圈,下面的代码:无效内容错误而绘制UIBezierPath
- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
UIBezierPath* aPath = [UIBezierPath bezierPathWithArcCenter:CGPointMake(100,100) radius:100 startAngle:M_PI/6 endAngle:M_PI clockwise:YES];
[aPath fill];
}
我收到以下错误:
CGContextSaveGState: invalid context 0x0. This is a serious error. This application, or a library it uses, is using an invalid context and is thereby contributing to an overall degradation of system stability and reliability. This notice is a courtesy: please fix this problem. It will become a fatal error in an upcoming update.
我知道这个问题已经在讨论here,但我不能涉及。错误发生在
[aPath fill];
这是否与应用程序生命周期有关?
您的程序是否正常运行,除了记录此错误? – nhgrif
它显示一个空白的视图。没有圈子。尽管应用程序不会崩溃。 –