iOS 10 设置view layer.cornerRadius
2016-09-24 本文已影响0人
壁虎尾巴
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;