Swift之画圆角添加多个枚举值方法

1.

    let cornerValue = UIRectCorner.topRight.rawValue|UIRectCorner.bottomRight.rawValue

     let corner = UIRectCorner(rawValue: cornerValue)

    let path = UIBezierPath.init(roundedRect: wifiLabel.bounds, byRoundingCorners: corner, cornerRadii: CGSize.init(width: 15, height: 15))

2.

let path = UIBezierPath.init(roundedRect: wifiLabel.bounds, byRoundingCorners: [.topRight,.bottomRight], cornerRadii: CGSize.init(width: 15, height: 15))

posted @ 2018-06-28 11:57  象棋中的象棋  阅读(176)  评论(0编辑  收藏  举报