Skip to content

Commit

Permalink
[Feat] #193 - 타이머 관련 바텀시트 로직 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
mini-min committed Sep 1, 2024
1 parent 05fa8a9 commit 00d962a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 14 deletions.
16 changes: 6 additions & 10 deletions TOASTER-iOS/Present/Remind/View/RemindViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -182,11 +182,9 @@ private extension RemindViewController {

let exampleBottom = ToasterBottomSheetViewController(bottomType: .gray,
bottomTitle: "수정하기",
height: 128,
insertView: editView)
exampleBottom.modalPresentationStyle = .overFullScreen

present(exampleBottom, animated: false)
exampleBottom.setupSheetPresentation(bottomHeight: 226)
present(exampleBottom, animated: true)
}

func setupAlarmBottomSheet() {
Expand All @@ -195,11 +193,9 @@ private extension RemindViewController {

let exampleBottom = ToasterBottomSheetViewController(bottomType: .white,
bottomTitle: "알림이 꺼져있어요!",
height: 311,
insertView: alarmView)
exampleBottom.modalPresentationStyle = .overFullScreen

present(exampleBottom, animated: false)
exampleBottom.setupSheetPresentation(bottomHeight: 427)
present(exampleBottom, animated: true)
}

func reloadCollectionViewWithView(forType: RemindViewType) {
Expand Down Expand Up @@ -265,7 +261,7 @@ extension RemindViewController: RemindAlarmOffBottomSheetViewDelegate {
extension RemindViewController: RemindEditViewDelegate {
func editTimer(forID: Int?) {
selectedTimerID = forID
dismiss(animated: false)
dismiss(animated: true)
if let forID {
let editViewController = RemindTimerAddViewController()
editViewController.configureView(forTimerID: forID)
Expand All @@ -275,7 +271,7 @@ extension RemindViewController: RemindEditViewDelegate {

func deleteTimer(forID: Int?) {
selectedTimerID = forID
dismiss(animated: false)
dismiss(animated: true)
showPopup(forMainText: "타이머를 삭제하시겠어요?",
forSubText: "더 이상 해당 클립의 리마인드를 \n받을 수 없어요",
forLeftButtonTitle: StringLiterals.Button.cancel,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -358,9 +358,11 @@ private extension RemindTimerAddViewController {
let repeatView = TimerRepeatBottomSheetView()
repeatView.setupDelegate(forDelegate: self)
repeatView.setupSelectedIndex(forIndexList: selectedIndex)
let exampleBottom = ToasterBottomSheetViewController(bottomType: .gray, bottomTitle: "반복설정", height: view.convertByHeightRatio(622), insertView: repeatView)
exampleBottom.modalPresentationStyle = .overFullScreen
self.present(exampleBottom, animated: false)
let exampleBottom = ToasterBottomSheetViewController(bottomType: .gray,
bottomTitle: "반복설정",
insertView: repeatView)
exampleBottom.setupSheetPresentation(bottomHeight: view.convertByHeightRatio(720))
self.present(exampleBottom, animated: true)
}

@objc func completeButtonTapped() {
Expand Down Expand Up @@ -391,6 +393,6 @@ extension RemindTimerAddViewController: TimerRepeatBottomSheetDelegate {
setSelectedIndex(contains: 9, deleteFirst: 1, deleteSecond: 5)
setSelectedIndex(contains: 10, deleteFirst: 6, deleteSecond: 7)

dismiss(animated: false)
dismiss(animated: true)
}
}

0 comments on commit 00d962a

Please sign in to comment.