swift -> UIView 添加一边 边框

        let bd = CALayer();
        bd.frame = CGRect(x: 0, y: 0, width: 0.5, height: ht);
        bd.backgroundColor = UIColor.init(white: 0.8, alpha: 1).cgColor;
        btn.layer.addSublayer(bd);

猜你喜欢

转载自mft.iteye.com/blog/2383901