So, I’m doing some custom drawing in a UIControl subclass by overriding the drawRect: method. The issue is that the control is clipping a glow that I drew in it even though I’ve set the clipsToBounds property to NO.

Any ideas?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
EmeilioPelaez has it right. You can’t draw outside your own frame. If you want the glow to overlap other UI elements, make the frame big enough to draw the glow, then make sure to set your own
opaqueflag to NO, and set the backgroundColor to[UIColor clearColor]. Keep in mind, compositing views incurs a pretty big performance hit, so maybe ask yourself if drawing that glow on top of other elements is really necessary.