
이전에 부트캠프에서 살짝 맛보기로 공부했던 적이 있어서 이해하기 조금 더 수월했다! 그래서 키워드에도 이전에 노션에 정리해놓은 링크를 살짝,,
self.view.safeAreaLayoutGuide를 작성해주면 됨[titleLabel, captionLabel, activateButton].forEach { subView in
    subView.translatesAutoresizingMaskIntoConstraints = false
    view.addSubview(subView)
}.isActive = true를 작성해줘도 되지만 여러 개를 적용시켜야할 때는 view.addConstraints([top, centerX, width, height]) 다음과 같이 작성하여 한 번에 적용시켜줄 수 있음.NSLayoutConstraint.activate([
            activateButton.centerXAnchor.constraint(equalTo: self.view.centerXAnchor),
            activateButton.widthAnchor.constraint(equalToConstant: 300),
            activateButton.heightAnchor.constraint(equalToConstant: 50),
            activateButton.bottomAnchor.constraint(equalTo: self.view.safeAreaLayoutGuide.bottomAnchor)
        ])말로만 듣던 Snapkit을 드디어 써봤다! NSLayoutConstraint는 확실히 코드가 너무 길어진다고 생각했는데 Snapkit을 사용해보니까 코드가 진짜 확 줄어드는게 느껴졌다!
translateAutoresizingMaskIntoConstraints값을 false로 설정해주고 있기 때문에 값을 변경해주지 않아도 됨
moneyLabel.snp.makeConstraints { make in
    make.centerX.equalTo(view)
    make.centerY.equalTo(view)
    make.width.equalTo(300)
    make.height.equalTo(80)
}
activateButton.snp.makeConstraints {
    $0.leadingMargin.equalTo(view)
    $0.trailingMargin.equalTo(view)
    $0.bottom.equalTo(view.safeAreaLayoutGuide)
    $0.height.equalTo(view).multipliedBy(0.1)
}
redView.snp.makeConstraints { make in
    // 레이아웃이 덮어쓰기 되겠지~ 라고 생각하면 안됨. 충돌할 확률이 높음
    make.edges.equalToSuperview().inset(100)
    //make.bottom.equalTo(-400)
}
// 하나의 constraint만 바꾸고싶을 때 updateConstraint 사용
redView.snp.updateConstraints { make in
    make.bottom.equalTo(-400)
}
redView.addSubview(blueView)
blueView.backgroundColor = .blue
blueView.snp.makeConstraints { make in
    // offset은 기존 view에 다 더해주는것... 이동시켜줌..~
    make.edges.equalToSuperview().offset(50)
}let moneyLabel = UILabel()
override func viewDidLoad() {
	super.viewDidLoad()
    	moneyLabel.text = "47200원"
    	moneyLabel.backgroundColor = .yellow
}let moneyLabel: UILabel = {
	let label = UILabel()
        label.backgroundColor = .yellow
        label.text = "47,200원"
        return label
}()