iOS 10 之前都是这样处理的
self.firstView.layer.cornerRadius = self.firstView.frame.size.width * 0.5;
self.firstView.clipsToBounds = YES;
[self.firstView layoutIfNeeded];//iOS 10需要添加这个
self.firstView.layer.cornerRadius = self.firstView.frame.size.width * 0.5;
self.firstView.clipsToBounds = YES;
网友评论