I don't understand why a simple view, with only cornerRadius
property set to an arbitrary value, works perfectly, while as soon as i override drawRect ( also trying to call super.drawRect()
) cornerRadius
doesn't work anymore. The solution is to set self.layer.masksToBounds
property to true, but i don't understand the structure of what happens behind the code, such as what functions are called first. The documentation about cornerRadius
doesn't help me.
Any suggestions/explanation ?
Thx