When the view loads in my iOS application, I dynamically create a UIImageView and place my Image inside of it. I would like to draw a simple circle on top of the UIImageView, but have been unable to do so thus far.
I wrote this code and attempted to draw a circle upon recieving an event from another object...
CGContextRef context = UIGraphicsGetCurrentContext();
CGContextSetRGBStrokeColor(context, 0, 0, 255, 0.5);
CGContextFillRect(context, CGRectMake(10, 10, 10, 10));
...but nothing happens I receive an error.
<Error>: CGContextSetRGBStrokeColor: invalid context 0x0
<Error>: CGContextFillRects: invalid context 0x0
I'm attempting to draw above everything, to no avail. What am I doing wrong?