let view = UIView(frame: CGRectMake(10.0, 10.0, 200.0, 200.0))
// 添加到父视图
self.view.addSubview(view)
// 背景颜色
view.backgroundColor = UIColor.redColor()
// layer层属性设置
view.layer.cornerRadius = 5.0
view.layer.borderColor = UIColor.greenColor().CGColor
view.layer.borderWidth = 1.0
view.layer.masksToBounds = true
let view01 = UIView(frame: CGRectMake(10.0, 10.0, 50.0, 50.0))
view.addSubview(view01)
view01.backgroundColor = UIColor.yellowColor()
let view02 = UIView(frame: CGRectMake(20.0, 20.0, 60.0, 60.0))
view.addSubview(view02)
view02.backgroundColor = UIColor.blueColor()
let view03 = UIView(frame: CGRectMake(30.0, 30.0, 70.0, 70.0))
view.addSubview(view03)
view03.backgroundCol