Subview appears underneath superviews layer.border?

前端 未结 4 1391
情歌与酒
情歌与酒 2020-12-01 09:02

I have a UIView in which I define it\'s border in the following manner:

self.layer.borderColor = [UIColor blackColor].CGColor;
self.layer.border         


        
4条回答
  •  一整个雨季
    2020-12-01 09:35

    Did you try setting the superview's 'clipsToBounds' property to YES? This is set to NO by default for performance reasons, but setting it to yes might give you the effect you are looking for.

提交回复
热议问题