kernix
kernix

Reputation: 8490

Parent UIView and Subview Background Color

I try to build a simple iPhone app. I want to create a custom UIView which represent rectangle and add to its subview custom UIView that draws a circle. I want that the rectangle UIView background to be blue, and the circle would be red. Is such thing possible? I want to set only the fill of inside the circle, but when I create the circle UIView it is actually a rectangle in its size, therefore if I want to acoomplish this I think I have to set the circle UIView's background to be the same as the rectangle's background. Must I set the circle's UIView's background color to be the same as the rectangle, or is there another way to accomplish this?(using maybe opaque?)

Thanks.

Upvotes: 2

Views: 476

Answers (1)

kernix
kernix

Reputation: 8490

I've just found that I can set the UIView background color to clearColor, which seems to be the result I wanted.

Upvotes: 2

Related Questions