View Full Version : Table View with pattern-from-image background color "smears"

Feb 14, 2012, 02:34 PM
I have a table view that I set the background color of to a pattern image. Whenever I grab the edge of the window and size it up smears are left in the direction of the resize, like dirty rects not being re-drawn properly. It doesn't happen when I turn off copy-on-scroll for the enclosing scroll view but I'd hate to lose performance to that since my table view is view-based and the views aren't very cheap. Any ideas as to how I can fix that?

Feb 15, 2012, 12:42 AM
The dirty, ugly way to handle this might be with a delegate to the window. The delegate can receive a message that live resize is starting: switch off copiesOnScroll; later, the delegate will receive the complementary message that resize is ending, at which point you can turn it back on. See if that works.

Feb 15, 2012, 03:53 PM
That sounds extremely hackish - did no one consider that people might use patterns as a background? Do I really have to fight against Cocoa to get this working?