7.14-7.16

来源:互联网 发布:whatsapp mac版 编辑:程序博客网 时间:2024/06/06 11:42

1.GIT

通过廖雪峰git网站教程了解与学习用github管理项目

2.用代码书写组件

override func viewDidLoad() {

        super.viewDidLoad()

        // Do any additional setup after loading the view, typically from a nib.

        let label:UILabel = UILabel(frame: CGRect(x:20, y:20, width:200, height: 100))

        label.text = "this is the first label"

       

        //设置字体

        label.font = UIFont.boldSystemFont(ofSize: 10)

        //设置文字的颜色

        label.textColor = UIColor.purple

        //设置label的背景色

        label.backgroundColor = UIColor.cyan

        //设置文字对齐方式

        label.textAlignment = NSTextAlignment.center

        //设置阴影

        label.shadowColor = UIColor.magenta

        label.shadowOffset = CGSize(width: 10, height:10)

        //设置行数

        label.numberOfLines = 0

        

        self.view.addSubview(label)

    }


3.ofo  第一章1-4



原创粉丝点击