UIView subclass draws background despite completely empty drawRect: - why?
Posted
by Pascal
on Stack Overflow
See other posts from Stack Overflow
or by Pascal
Published on 2009-10-11T17:52:12Z
Indexed on
2010/03/18
22:21 UTC
Read the original article
Hit count: 359
So, I have a custom UIView subclass which enables drawing of rounded edges. The thing draws perfectly, however the background always fills the whole bounds, despite clipping to a path first. The border also draws above the rectangular background, despite the fact that I draw the border in drawRect: before the background. So I removed the whole content of drawRect:, which is now virtually empty - nevertheless the background gets drawn!
Anybody an explanation for this? I set the backgroundColor in Interface Builder. Thanks!
© Stack Overflow or respective owner