I create UIViewwith a custom function drawRect. This is a rather complicated representation in which several different elements need to be distinguished. I basically broke it down into one function per element to be drawn.
I am wondering if I should pass mine CGContextRef, obtained from UIGraphicsGetCurrentContext(), as a parameter for each function, or can I just call it at the beginning of each function? The last option looks more accurate for me, but I wonder if there is a significant penalty for performance?
source
share