@@ -99,6 +99,7 @@ final class CourseDrawingVC: UIViewController {
9999 self . setLayout ( )
100100 self . setAddTarget ( )
101101 self . bindMapView ( )
102+ self . setNavigationGesture ( false )
102103 }
103104}
104105
@@ -122,6 +123,10 @@ extension CourseDrawingVC {
122123 self ? . undoButton. isEnabled = ( count >= 2 )
123124 } . store ( in: cancelBag)
124125 }
126+
127+ private func setNavigationGesture( _ enabled: Bool ) {
128+ navigationController? . interactivePopGestureRecognizer? . isEnabled = enabled
129+ }
125130}
126131
127132// MARK: - @objc Function
@@ -147,12 +152,18 @@ extension CourseDrawingVC {
147152 let alertVC = CustomAlertVC ( )
148153 alertVC. modalPresentationStyle = . overFullScreen
149154
150- alertVC. leftButtonTapped. sink { _ in
151- print ( " left Tap " )
155+ alertVC. leftButtonTapped. sink { [ weak self] _ in
156+ guard let self = self else { return }
157+ self . tabBarController? . selectedIndex = 1
158+ self . navigationController? . popToRootViewController ( animated: true )
159+ alertVC. dismiss ( animated: true )
152160 } . store ( in: cancelBag)
153161
154- alertVC. rightButtonTapped. sink { _ in
155- print ( " right Tap " )
162+ alertVC. rightButtonTapped. sink { [ weak self] _ in
163+ guard let self = self else { return }
164+ let countDownVC = CountDownVC ( )
165+ self . navigationController? . pushViewController ( countDownVC, animated: true )
166+ alertVC. dismiss ( animated: true )
156167 } . store ( in: cancelBag)
157168
158169 self . present ( alertVC, animated: false )
0 commit comments