I am having problems with my UIViewsubclass function drawRect:. I use CGContextDrawRadialGradient()in him and he. When the user drags my UIView, he tried his best to keep up with the gradient.
Using Time Profiler, I see that literally> 98% of my time is spent in my subclass drawRect: method.
First: will using a static gradient image be faster? Second: is there a way to speed this up? Can I cache the gradient? it does not change much, but the paths around it and its intersections change when dragging UIView.
If anyone knows a general guide on how to make methods drawRect:not suck all processor cycles, that would be great.
source
share