Kontext:
Ich habe eine UIView innerhalb einer TableView, worin ich etwas zeichne. Diese UIView hat eine 'Custom Class' in der ich in der drawRect Methode eine weitere Methode aufrufe, in der dieser Code steht.
Soweit so gut (noch kein Console Log). Wenn ich nun von dem TableViewController die oben genannte Methode aufrufe, bekomme ich den unten stehenden Log.
Bei der Zeile [[UIColor grayColor] setStroke]; kommt einmal die erste Spalte vom Console Log und er Rest bei dieser Zeile [path stroke];
Das Komische ist nämlich, das dies nur beim Aufrufen außerhalb der UIView drawRect Methode passiert. Nun meine Frage.. hat irgendwer schon ein ähnliches Problem vorgefunden bzw. mache ich in meinem Code etwas falsch?
Ich bedanke mich schon mal im Voraus für jegliche Hilfe.
Hier der Console Log:
Sep 4 21:56:34 Markuss-MacBook-Pro.local itn-stats[5755] <Error>: CGContextSetStrokeColorWithColor: 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.
Sep 4 21:56:34 Markuss-MacBook-Pro.local itn-stats[5755] <Error>: 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.
Sep 4 21:56:34 Markuss-MacBook-Pro.local itn-stats[5755] <Error>: CGContextSetLineWidth: 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.
Sep 4 21:56:34 Markuss-MacBook-Pro.local itn-stats[5755] <Error>: CGContextSetLineJoin: 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.
Sep 4 21:56:34 Markuss-MacBook-Pro.local itn-stats[5755] <Error>: CGContextSetLineCap: 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.
Sep 4 21:56:34 Markuss-MacBook-Pro.local itn-stats[5755] <Error>: CGContextSetMiterLimit: 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.
Sep 4 21:56:34 Markuss-MacBook-Pro.local itn-stats[5755] <Error>: CGContextSetFlatness: 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.
Sep 4 21:56:34 Markuss-MacBook-Pro.local itn-stats[5755] <Error>: CGContextAddPath: 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.
Sep 4 21:56:34 Markuss-MacBook-Pro.local itn-stats[5755] <Error>: CGContextDrawPath: 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.
Sep 4 21:56:34 Markuss-MacBook-Pro.local itn-stats[5755] <Error>: CGContextRestoreGState: 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.
Ich habe eine UIView innerhalb einer TableView, worin ich etwas zeichne. Diese UIView hat eine 'Custom Class' in der ich in der drawRect Methode eine weitere Methode aufrufe, in der dieser Code steht.
Quellcode
- - (UIBezierPath*)bezierPathWithStartAngle:(float)startAngle endAngle:(float)endAngle {
- CGPoint center = CGPointMake(self.frame.size.width / 2.0, self.frame.size.height / 2.0);
- UIBezierPath *path = [UIBezierPath bezierPath];
- [path addArcWithCenter:center radius:50 startAngle:startAngle endAngle:endAngle clockwise:YES];
- [[UIColor grayColor] setStroke];
- [path setLineWidth:lineWidth];
- [path stroke];
- return path;
- }
Soweit so gut (noch kein Console Log). Wenn ich nun von dem TableViewController die oben genannte Methode aufrufe, bekomme ich den unten stehenden Log.
Bei der Zeile [[UIColor grayColor] setStroke]; kommt einmal die erste Spalte vom Console Log und er Rest bei dieser Zeile [path stroke];
Das Komische ist nämlich, das dies nur beim Aufrufen außerhalb der UIView drawRect Methode passiert. Nun meine Frage.. hat irgendwer schon ein ähnliches Problem vorgefunden bzw. mache ich in meinem Code etwas falsch?
Ich bedanke mich schon mal im Voraus für jegliche Hilfe.
Hier der Console Log:
Sep 4 21:56:34 Markuss-MacBook-Pro.local itn-stats[5755] <Error>: CGContextSetStrokeColorWithColor: 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.
Sep 4 21:56:34 Markuss-MacBook-Pro.local itn-stats[5755] <Error>: 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.
Sep 4 21:56:34 Markuss-MacBook-Pro.local itn-stats[5755] <Error>: CGContextSetLineWidth: 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.
Sep 4 21:56:34 Markuss-MacBook-Pro.local itn-stats[5755] <Error>: CGContextSetLineJoin: 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.
Sep 4 21:56:34 Markuss-MacBook-Pro.local itn-stats[5755] <Error>: CGContextSetLineCap: 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.
Sep 4 21:56:34 Markuss-MacBook-Pro.local itn-stats[5755] <Error>: CGContextSetMiterLimit: 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.
Sep 4 21:56:34 Markuss-MacBook-Pro.local itn-stats[5755] <Error>: CGContextSetFlatness: 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.
Sep 4 21:56:34 Markuss-MacBook-Pro.local itn-stats[5755] <Error>: CGContextAddPath: 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.
Sep 4 21:56:34 Markuss-MacBook-Pro.local itn-stats[5755] <Error>: CGContextDrawPath: 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.
Sep 4 21:56:34 Markuss-MacBook-Pro.local itn-stats[5755] <Error>: CGContextRestoreGState: 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.