WBC 대만 영웅 카드

Mar 16 2023
WBC 대만은 최근 모든 대회를 마쳤습니다. 비록 본선에 진출하지는 못했지만, 각 선수는 대만 관객들에게 긴장감 넘치는 게임 콘텐츠를 가져왔습니다. 이 카드를 만들어 이 영웅들에게 경의를 표하기 위해 먼저 그림을 설정합니다.

WBC 대만은 최근 모든 대회가 종료되었습니다. 비록 본선에 진출하지는 못했지만, 각 선수는 대만 관객들에게 하이텐션 게임 콘텐츠를 가져왔습니다. 이 카드는 이러한 영웅들에게 경의를 표하기 위해 만들어졌습니다.

먼저 그림 설정

import UIKit

var image = UIImage(named: "張育成.jpg")
let imageView = UIImageView(image: image)
imageView.layer.borderWidth = 5
imageView.layer.borderColor = CGColor(red: 1, green: 0, blue: 0, alpha: 1)
imageView.layer.cornerRadius = 50
imageView.clipsToBounds = true


      
                

let message = UILabel(frame: CGRect(x: 50, y: 70, width: 300, height: 80))

message.text = "台灣英雄"
message.textColor = UIColor(red: 160/255, green: 160/255, blue: 0, alpha: 1)
message.font = UIFont.systemFont(ofSize: 40)
imageView.addSubview(message)
let messageName = UILabel(frame: CGRect(x: 570, y: 70, width: 300, height: 80))

messageName.text = "張育成"
messageName.textColor = UIColor(red: 160/255, green: 160/255, blue: 0, alpha: 1)
messageName.font = UIFont.systemFont(ofSize: 40)
imageView.addSubview(messageName)
for i in 1...10 {
    let ball = UILabel(frame: CGRect(x: 70 * i, y: 0, width: 80 , height: 80))
        ball.text = "⚾️"
        ball.font = UIFont.systemFont(ofSize: 40)
        imageView.addSubview(ball)
}

for i in 1...10 {
    let ball = UILabel(frame: CGRect(x: 70 * i, y: 460, width: 80 , height: 80))
        ball.text = "⚾️"
        ball.font = UIFont.systemFont(ofSize: 40)
        imageView.addSubview(ball)
}
for i in 1...5 {
    let ball = UILabel(frame: CGRect(x: 3, y: 100 * i, width: 80 , height: 80))
        ball.text = ""
        ball.font = UIFont.systemFont(ofSize: 40)
        imageView.addSubview(ball)
}

for i in 1...5 {
    let ball = UILabel(frame: CGRect(x: 720, y: 100 * i, width: 80 , height: 80))
        ball.text = ""
        ball.font = UIFont.systemFont(ofSize: 40)
        imageView.addSubview(ball)
}
imageView