iOS 10 设置view layer.cornerRadius 时不显示的解决方法

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;

你可能感兴趣的:(iOS 10 设置view layer.cornerRadius 时不显示的解决方法)