Draw line
suggest changeCGContextRef context = UIGraphicsGetCurrentContext();
CGContextSetLineWidth(context, 5.0);
CGColorSpaceRef colorspace = CGColorSpaceCreateDeviceRGB();
CGContextMoveToPoint(context, 200, 400);
CGContextAddLineToPoint(context, 100, 100);
CGContextStrokePath(context);
CGColorSpaceRelease(colorspace);
![](/essential/ios/img/4405a0a205810ca6137c21258ebc7329a7f38571.png)
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents