//创建View let view1 =UIView() let view2 =UIView(frame: CGRectMake(,, ,)) let view3 =UIView(frame: CGRectMake(,, ,)) //设置view的尺寸 view1.frame =CGRectMake(,, ,) //设置view的背景色 view1.backgroundColor =UIColor.redColor() view2.backgroundColor =UIColor.greenCo…