Cartão WBC Taiwan Hero
Mar 16 2023
WBC Taiwan acabou de terminar todas as competições recentemente. Embora não tenham se classificado, cada jogador trouxe um conteúdo de jogo de alta tensão para o público taiwanês. Para fazer este cartão em homenagem a esses heróis, primeiro defina a imagem.
WBC Taiwan acabou de encerrar todas as competições recentemente. Embora não tenham se classificado, cada jogador trouxe um conteúdo de jogo de alta tensão para o público taiwanês. Este cartão é feito para homenagear esses heróis
Primeiro defina a imagem
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
