简体   繁体   English

QuartzCore不绘制角半径

[英]QuartzCore not drawing corner radius

I added the QuartzCore framework to my ios 5.0 project and then tried 我将QuartzCore框架添加到ios 5.0项目中,然后尝试

[self layer] setCornerRadius:10.0f];

and nothing happens to the view; 而且视图没有任何变化; it still a rectangle. 它仍然是一个矩形。 What should I check? 我应该检查什么?

尝试将mask设置为bounds属性。

self.layer.maskToBounds = YES;

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM