views:

197

answers:

2

I subclassed a subview and added it to the current view. It draws a simple circle by overriding the draw method.

But the subview has a black background it looks like by default. How do I make the background of my subclassed subview to be transparent?

+3  A: 

does

self.backgroundColor = [UIColor clearColor] not work?

justin
A: 

You can call next code into view initialization:

self.backgroundColor = [UIColor clearColor];

Victor