Ian Vink
Ian Vink

Reputation: 68740

iPhone Subview Transparent

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?

Upvotes: 0

Views: 949

Answers (2)

Victor
Victor

Reputation: 3517

You can call next code into view initialization:

self.backgroundColor = [UIColor clearColor];

Upvotes: 0

justin
justin

Reputation: 868

does

self.backgroundColor = [UIColor clearColor] not work?

Upvotes: 4

Related Questions