I have a simple UIView in drawRect: I add a UIImageView as a subtitle, and then try to draw a line on top of this subview. But, the line draws on the image.
How can I make the drawing context subordinate to draw on top of it?
CGContextRef context = UIGraphicsGetCurrentContext(); CGContextSetLineWidth(context, 10.0); CGContextSetStrokeColorWithColor(context, [UIColor blueColor].CGColor); CGContextBeginPath(context); CGContextMoveToPoint(context, 0, 0); CGContextAddCurveToPoint(context,125,150,175,150,200,100); CGContextAddCurveToPoint(context,225,50,275,75,300,200); CGContextStrokePath(context);
source share