Untitled

mail@pastecode.io avatar
unknown
plain_text
19 days ago
1.9 kB
1
Indexable
Never
import UIKit

class QueViewController: UIViewController {

	lazy var emojiLbl: UILabel = {
		let label = UILabel()
		label.text = "⛹🏾"
		label.textAlignment = .left
		label.font = UIFont(name: Fonts.sequelMediumDisp, size: 100)
		label.translatesAutoresizingMaskIntoConstraints = false
		return label
	}()

	lazy var athleteLabel: UILabel = {
		let label = UILabel()
		label.text = "basketball player"
		label.numberOfLines = 2
		label.font = UIFont(name: Fonts.sequelMediumDisp, size: 65)
		label.textAlignment = .left
		label.textColor = .blue
		label.translatesAutoresizingMaskIntoConstraints = false
		return label
	}()

	lazy var quejohnson: UILabel = {
		let label = UILabel()
		label.text = "que johnson"
		label.font = UIFont(name: Fonts.sequelSemiBoldDisp, size: 15)
		label.translatesAutoresizingMaskIntoConstraints = false
		return label
	}()

	override func viewDidLoad() {
		super.viewDidLoad()
		view.backgroundColor = .systemPink

		view.addSubview(emojiLbl)
		emojiLbl.centerYAnchor.constraint(equalTo: view.centerYAnchor, constant: -100).isActive = true
		emojiLbl.centerXAnchor.constraint(equalTo: view.centerXAnchor).isActive = true
		emojiLbl.leftAnchor.constraint(equalTo: view.leftAnchor).isActive = true
		emojiLbl.rightAnchor.constraint(equalTo: view.rightAnchor).isActive = true

		view.addSubview(athleteLabel)
		athleteLabel.centerYAnchor.constraint(equalTo: view.centerYAnchor).isActive = true
		athleteLabel.centerXAnchor.constraint(equalTo: view.centerXAnchor).isActive = true
		athleteLabel.leftAnchor.constraint(equalTo: view.leftAnchor, constant: 20).isActive = true
		athleteLabel.rightAnchor.constraint(equalTo: view.rightAnchor).isActive = true

		view.addSubview(quejohnson)
		quejohnson.centerYAnchor.constraint(equalTo: view.centerYAnchor, constant: 100).isActive = true
		quejohnson.centerXAnchor.constraint(equalTo: view.centerXAnchor).isActive = true

	}
}
Leave a Comment