Building Spotify App in Swift 5 & UIKit - Part 28 (Xcode 12, 2021, Swift 5) - Build App
WelcomeViewController
다듬기private let imageView: UIImageView = {
let imageView = UIImageView()
imageView.contentMode = .scaleAspectFill
imageView.image = UIImage(named: "albums_background")
return imageView
}()
private let overlayView: UIView = {
let view = UIView()
view.backgroundColor = .black
view.alpha = 0.7
return view
}()
private let logoImageView: UIImageView = {
let imageView = UIImageView()
imageView.image = UIImage(named: "logo")
imageView.contentMode = .scaleAspectFit
return imageView
}()
private let label: UILabel = {
let label = UILabel()
label.numberOfLines = 0
label.textColor = .white
label.textAlignment = .center
label.font = .systemFont(ofSize: 32, weight: .semibold)
label.text = "Listen to Millions\nof Songs on\nthe go."
return label
}()
WelcomeViewController
에 추가하기 위한 컴포넌트 뷰viewDidLoad()
, viewDidLayoutSubviews()
등에서 함께 현재 뷰에 추가, 프레임 조정