@@ -3,24 +3,30 @@ import SnapKit
33import Then
44import DesignSystem
55import SwiftUI
6+
7+ #if DEV
68import Pulse
79import PulseUI
10+ #endif
811
912public class BaseTabBarController : UITabBarController ,
1013 SetLayoutable ,
1114 AddViewable {
1215 private let impactFeedbackGenerator = UIImpactFeedbackGenerator ( style: . light)
13- private let consoleButtonSize : CGRect = CGRect ( x: 0 , y: 0 , width: 100 , height: 40 )
1416
1517 private let stroke = UIView ( ) . then {
1618 $0. backgroundColor = . GrayScale. gray30
1719 }
1820
21+ #if DEV
22+ private let consoleButtonSize : CGRect = CGRect ( x: 0 , y: 0 , width: 100 , height: 40 )
23+
1924 private lazy var consoleButton = UIButton ( frame: consoleButtonSize) . then {
2025 $0. setJobisText ( " Console " , font: . body, color: . GrayScale. gray10)
2126 $0. backgroundColor = . GrayScale. gray70
2227 $0. layer. cornerRadius = consoleButtonSize. height / 2
2328 }
29+ #endif
2430
2531 public override func viewDidLoad( ) {
2632 super. viewDidLoad ( )
@@ -37,6 +43,7 @@ public class BaseTabBarController: UITabBarController,
3743 #endif
3844 }
3945
46+ #if DEV
4047 private func setConsoleButton( ) {
4148 self . view. addSubview ( consoleButton)
4249 consoleButton. addTarget ( self , action: #selector( touchConsoleButton) , for: . touchUpInside)
@@ -47,6 +54,7 @@ public class BaseTabBarController: UITabBarController,
4754 y: UIScreen . main. bounds. height - 100
4855 )
4956 }
57+ #endif
5058
5159 public func addView( ) {
5260 self . tabBar. addSubview ( stroke)
@@ -64,8 +72,8 @@ public class BaseTabBarController: UITabBarController,
6472 self . impactFeedbackGenerator. impactOccurred ( )
6573 }
6674
75+ #if DEV
6776 @objc func panAction( recognizer: UIPanGestureRecognizer ) {
68-
6977 let transition = recognizer. translation ( in: consoleButton)
7078
7179 if recognizer. state != . ended {
@@ -83,6 +91,7 @@ public class BaseTabBarController: UITabBarController,
8391
8492 self . present ( UIHostingController ( rootView: view) , animated: true )
8593 }
94+ #endif
8695}
8796
8897extension BaseTabBarController : UITabBarControllerDelegate {
@@ -133,7 +142,6 @@ final class TabbarSlideAnimator: NSObject, UIViewControllerAnimatedTransitioning
133142 toView
134143 ] . forEach ( container. addSubview ( _: ) )
135144
136- toView. layoutIfNeeded ( )
137145 toView. center. x += distanceX
138146 toView. alpha = 0.0
139147
0 commit comments