Я использую UIBezierPath
, чтобы нарисовать линию. Но наличие ошибки Это мой код:Ошибка при использовании UIBezierPath
UIBezierPath *aPath = [UIBezierPath bezierPath];
[aPath moveToPoint:CGPointMake(100, 100)];
[aPath addLineToPoint:CGPointMake(200, 200)];
[aPath closePath];
aPath.lineWidth = 5;
[[UIColor redColor] setStroke];
[aPath stroke];
Это ошибка:
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.
http://stackoverflow.com/questions/19599266/invalid-context -0x0-under-ios-7-0-system-demation –