Hey there,
I'm trying to mix between UIImageView drawing and line drawing using CGContext path draw commands, but the draw order is not correct. I need to draw the path on top of the images but get the reverse.
The way I implemented it:
- Setting UIImage within a UIImageView and adding the UIImageView as a subview of the main view.
- Next I use the 'drawRect' (refresh draw function) to draw the path using the UIKit CGContextStrokePath function.
Now, other than using the Context image draw function directly (I want to avoid that because I reuse my image resources by several UIImageViews), is there a way to set the order correctly (a flag set maybe)?
The problem again is that lines/path are drawn before the UIImageViews (which are drawn automatically via the connection to the parent UIView), hence they are not visible over the images / UIImageViews.
Thanks