美文网首页
iOS 视图画半圆

iOS 视图画半圆

作者: Still4ever幺惊云 | 来源:发表于2017-03-24 17:34 被阅读0次

    let  maskPath = UIBezierPath.init(roundedRect: box, byRoundingCorners: [.topRight,.topLeft], cornerRadii: CGSizeMake(width: 6.0, height: 6.0))

    let maskLayer = CAShapeLayer()

    maskLayer.frame = self.bgView.bounds

    maskLayer.path = maskPath.cgPath

    self.bgView.layer.mask = maskLayer

    相关文章

      网友评论

          本文标题:iOS 视图画半圆

          本文链接:https://www.haomeiwen.com/subject/beersttx.html