Skip to content

Commit 67cf99a

Browse files
authored
Merge pull request #406 from Team-return/feature/(#405)-mainThead_Hang
🔗 :: (#405) 스레드 병목 개선, Hang 제거
2 parents 2a54ec7 + ff87e92 commit 67cf99a

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed

Projects/App/Sources/AppDelegate.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,10 @@ final class AppDelegate: UIResponder, UIApplicationDelegate {
3737

3838
// 파이어베이스 설정
3939
FirebaseApp.configure()
40+
41+
#if DEV
4042
URLSessionProxyDelegate.enableAutomaticRegistration()
43+
#endif
4144

4245
// 앱 실행 시 사용자에게 알림 허용 권한을 받음
4346
UNUserNotificationCenter.current().delegate = self

Projects/Presentation/Sources/Base/BaseTabBarController.swift

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,24 +3,30 @@ import SnapKit
33
import Then
44
import DesignSystem
55
import SwiftUI
6+
7+
#if DEV
68
import Pulse
79
import PulseUI
10+
#endif
811

912
public 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

8897
extension 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

Comments
 (0)