-11四國聯軍-台灣還沒能有太陽

國旗練習part2-沒陽光的台灣 x日本 x德國 x奧地利
import UIKit
/底色
let backrect = CGRect(x: 0, y:0, width:600,height:420)
let backrectView = UIView(frame:backrect)
backrectView.backgroundColor = UIColor(red: 1,green: 1,blue: 1,alpha: 1)
/沒陽光的台灣
let rect = CGRect(x: 0, y: 0, width: 300, height: 210)
let backgroundView = UIView(frame: rect)
backgroundView.backgroundColor = UIColor(red: 1,green: 0,blue: 0,alpha: 1)
var square = CGRect(x: 0, y: 0, width: 140, height: 100)
let square_view = UIView(frame: square)
square_view.backgroundColor = UIColor(red: 0,green: 0,blue: 1,alpha: 1)
square = CGRect(x: 40, y: 20, width: 60, height: 60)
let circleView = UIView(frame: square)
circleView.backgroundColor = UIColor(red: 1,green: 1,blue: 1,alpha: 1)
circleView.layer.cornerRadius = 30
circleView.clipsToBounds = true
/奧地利
let AUrect = CGRect(x: (backrectView.frame.width)/2, y: (backrectView.frame.height)/2, width: 300, height: 210)
let AUbackgroundView = UIView(frame: AUrect)
AUbackgroundView.backgroundColor = UIColor(red: 1,green: 0,blue: 0,alpha: 1)
let rectWhite1 = CGRect(x: 300, y: (backrectView.frame.height)/1.5, width: 300, height: 70)
let rectWhite1_View = UIView(frame: rectWhite1)
rectWhite1_View.backgroundColor = UIColor(red: 1,green: 1,blue: 1,alpha: 1)
backrectView.addSubview(AUbackgroundView)
backrectView.addSubview(backgroundView)
backrectView.addSubview(square_view)
backrectView.addSubview(circleView)
backrectView.addSubview(rectWhite1_View)
/日本
let JPrect = CGRect(x: (backrectView.frame.width)/2, y:0 ,width:300,height:210)
let JPrectView = UIView(frame:JPrect)
JPrectView.backgroundColor = UIColor(red:1,green:1,blue:1,alpha:1)
let JPcircle = CGRect(x:(JPrectView.frame.width)/4,y:(JPrectView.frame.height)/6,width:150,height:150)
let JPcircleView = UIView(frame:JPcircle)
JPcircleView.backgroundColor = UIColor(red:1,green:0,blue:0,alpha:1)
JPcircleView.layer.cornerRadius = 75
JPcircleView.clipsToBounds = true
JPrectView.addSubview(JPcircleView)
backrectView.addSubview(JPrectView)
/德國
let GMrect = CGRect(x: 0, y: (backrectView.frame.height)/2, width: 300, height: 210)
let GMrectView = UIView(frame: GMrect)
GMrectView.backgroundColor = UIColor(red: 1,green: 1,blue: 1,alpha: 1)
let rectblack1 = CGRect(x: 0, y: (backrectView.frame.height)/450, width: 300, height: 70)
let rectblack1_View = UIView(frame: rectblack1)
rectblack1_View.backgroundColor = UIColor(red: 0,green: 0,blue: 0,alpha: 1)
GMrectView.addSubview(rectblack1_View)
let rectred1 = CGRect(x: 0, y: (backrectView.frame.height)/6, width: 300, height: 70)
let rectred1_View = UIView(frame: rectred1)
rectred1_View.backgroundColor = UIColor(red: 1,green: 0,blue: 0,alpha: 1)
GMrectView.addSubview(rectred1_View)
let rectyellow1 = CGRect(x: 0, y: (backrectView.frame.height)/3, width: 300, height: 70)
let rectyellow1_View = UIView(frame: rectyellow1)
rectyellow1_View.backgroundColor = UIColor(red: 1,green: 1,blue: 0,alpha: 1)
GMrectView.addSubview(rectyellow1_View)
backrectView.addSubview(GMrectView)
let cross1 = CGRect(x: (backrectView.frame.width)/2,y: (backrectView.frame.height)/150,width:2, height:420)
let cross1_View = UIView(frame:cross1)
cross1_View.backgroundColor = UIColor(red:0,green:0,blue:0,alpha:1)
backrectView.addSubview(cross1_View)
let cross2 = CGRect(x: (backrectView.frame.width)/150,y: (backrectView.frame.height)/2,width:600, height:2)
let cross2_View = UIView(frame:cross2)
cross2_View.backgroundColor = UIColor(red:0,green:0,blue:0,alpha:1)
backrectView.addSubview(cross2_View)
backrectView
四個國旗

打完這些code很像知道了什麼什麼@0@