TeamFogFog / FogFog-iOS

모두가 만족할 수 있는 흡연문화를 만듭니다.
32 stars 4 forks source link

[#18] BottomDetailView 레이아웃 구현 #20

Closed Taehyeon-Kim closed 1 year ago

Taehyeon-Kim commented 1 year ago

🔍 What is this PR?

BottomDetailView 레이아웃을 구현했어요.

📝 Changes

🗣 Comment

📌 Usage

func showBottomSheet(withDuration duration: Double = 0.3) {
    let movement = Metrics.bottomSheetBottom

    bottomSheetView.snp.updateConstraints {
        $0.bottom.equalToSuperview().inset(movement)
    }

    UIView.animate(withDuration: duration) { [weak self] in
        self?.layoutIfNeeded()
    }
}
func hideBottomSheet(withDuration duration: Double = 0.3) {
    let movement = -(Metrics.bottomSheetViewHeight + Metrics.bottomSheetBottom)

    bottomSheetView.snp.updateConstraints {
        $0.bottom.equalToSuperview().inset(movement)
    }

    UIView.animate(withDuration: duration) { [weak self] in
        self?.layoutIfNeeded()
    }
}

📸 Screenshot

구현 내용 스크린샷
SE 2(3rd Generation)
13 mini Animation

☑️ Test Checklist

📮 관련 이슈