Open mindersw opened 11 years ago
Do you have a sample project or video showing what happens?
Just used the attached class in place of the existing one in the example project. Note the drawBackgroundInClipRect method in the Drawing section, used to customize the background. I realize this isn't part of your release class, but I think it's important to get working correctly as people do more advanced things with their UIs.
Michael A. LaMorte Mac Developer Minder Softworks
On Oct 25, 2013, at 7:05 AM, Alex Rozanski notifications@github.com wrote:
Do you have a sample project or video showing what happens?
— Reply to this email directly or view it on GitHub.
It looks like the issue here is that the area you're drawing into is based on the dirtyRect
parameter that is passed in. The drawing issues are occurring because this method is often called to redraw small sections of the background (which are passed in as the dirtyRect
), which you're drawing into as if you were drawing the background of the entire view.
If you instead always redraw the entire background in this method then you don't get (most of) these drawing issues (as a quick test I just set dirtyRect
to self.enclosingScrollView.bounds
in the first line of the method). It's less efficient, but since you're working with gradients and shadows it would be tricky to do this more efficiently when only redrawing small areas.
For some reason, there is still a small flash of incorrect drawing when expanding and collapsing a section which I couldn't quite figure out. Let me know if you make progress with that.
I've added the below method to PXSourceList.m to customize the background. When clicking Show/Hide on a parent row, the background has some redraw issues while collapsing or expanding. Before and after the Show/Hide operation the view is rendered fine, the problem just happens during the operation's animation.