Swift UILabel方法总结

        let label = UILabel();
        label.frame = CGRect(x:100,y:100,width: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

posted @ 2017-10-17 11:43  朝阳向日葵  阅读(456)  评论(0编辑  收藏  举报