我試圖在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
它顯示一個空白的視圖。沒有圈子。儘管應用程序不會崩潰。 –