美文网首页
iOS:swift xib边框颜色,圆角等

iOS:swift xib边框颜色,圆角等

作者: Liu____ | 来源:发表于2020-11-16 08:54 被阅读0次

    layer.cornerRadius
    layer.borderWidth
    layer.borderUIColor

    边框颜色要写extension

    @IBDesignable extension CALayer {
        @IBInspectable var borderUIColor: UIColor {
            get {
                return UIColor(cgColor: self.borderColor!)
            }
            set {
                self.borderColor = newValue.cgColor
            }
        }
    }
    

    https://www.jianshu.com/p/f3506690b065

    相关文章

      网友评论

          本文标题:iOS:swift xib边框颜色,圆角等

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