Swift UILabel方法总结

        let label = UILabel();
        label.frame = CGRect(x:100,y:100,160,height:30);
        label.text = "我是SwiftLabel";
        label.backgroundColor = UIColor.orange;
        label.textColor = UIColor.blue;
        label.font = UIFont.systemFont(ofSize: 22);
        label.textAlignment = NSTextAlignment.center
        label.isUserInteractionEnabled = true;
        self.view?.addSubview(label);
详细代码查看:https://github.com/xiaolitou-ping/Swift-All

原文地址:https://www.cnblogs.com/laolitou-ping/p/7680859.html