Skip to content

Commit f6c9995

Browse files
Merge pull request #345 from BCSDLab/feat/chat-polling
feat: WebSocket 방식 채팅 API를 polling 방식으로 변경, UI 수정
2 parents bd6d87c + 56878eb commit f6c9995

19 files changed

Lines changed: 491 additions & 319 deletions

Koin/Core/View/ModalViewController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ class ModalViewController: UIViewController {
4949
private let containerView: UIView = {
5050
let view = UIView()
5151
view.backgroundColor = .white
52-
view.layer.cornerRadius = 4
52+
view.layer.cornerRadius = 8
5353
view.layer.masksToBounds = true
5454
return view
5555
}()

Koin/Core/View/ModalViewControllerB.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ class ModalViewControllerB: UIViewController {
5353
private let containerView: UIView = {
5454
let view = UIView()
5555
view.backgroundColor = .white
56-
view.layer.cornerRadius = 4
56+
view.layer.cornerRadius = 8
5757
view.layer.masksToBounds = true
5858
return view
5959
}()

Koin/Core/View/ZoomedImageViewControllerB/Subviews/ZoomedImageRootViewController.swift

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ final class ZoomedImageRootViewController: UIViewController {
1313
// MARK: - Properties
1414
private var subscriptions: Set<AnyCancellable> = []
1515
private var initialTouchPoint = CGPoint(x: 0, y: 0)
16+
private let shouldShowTitle: Bool
1617

1718
// MARK: - UI Components
1819
private let zoomedImageCollectionView = ZoomedImageCollectionView()
@@ -28,6 +29,15 @@ final class ZoomedImageRootViewController: UIViewController {
2829
$0.endPoint = CGPoint(x: 0.0, y: 1.0)
2930
}
3031

32+
// MARK: - Initializer
33+
init(shouldShowTitle: Bool = true) {
34+
self.shouldShowTitle = shouldShowTitle
35+
super.init(nibName: nil, bundle: nil)
36+
}
37+
required init?(coder: NSCoder) {
38+
fatalError("init(coder:) has not been implemented")
39+
}
40+
3141
// MARK: - Life Cycle
3242
override func viewDidLoad() {
3343
super.viewDidLoad()
@@ -49,13 +59,18 @@ final class ZoomedImageRootViewController: UIViewController {
4959
// MARK: - Configure
5060
func configure(urls: [String], initialIndexPath: IndexPath) {
5161
zoomedImageCollectionView.configure(urls: urls, initialIndexPath: initialIndexPath)
52-
title = "\(initialIndexPath.row+1)/\(urls.count)"
62+
if shouldShowTitle {
63+
title = "\(initialIndexPath.row+1)/\(urls.count)"
64+
}
5365
}
5466

5567
// MARK: - Bind
5668
private func bind() {
5769
zoomedImageCollectionView.updateTitlePublisher.sink { [weak self] title in
58-
self?.title = title
70+
if let self,
71+
self.shouldShowTitle {
72+
self.title = title
73+
}
5974
}.store(in: &subscriptions)
6075

6176
zoomedImageCollectionView.hideNavigationBarPublisher.sink { [weak self] isHidden in

Koin/Core/View/ZoomedImageViewControllerB/ZoomedImageViewControllerB.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,11 @@ import UIKit
1010
final class ZoomedImageViewControllerB: UINavigationController {
1111

1212
// MARK: - Properties
13-
let rootViewController = ZoomedImageRootViewController()
13+
let rootViewController: ZoomedImageRootViewController
1414

1515
// MARK: - Initializer
16-
init() {
16+
init(shouldShowTitle: Bool = true) {
17+
rootViewController = ZoomedImageRootViewController(shouldShowTitle: shouldShowTitle)
1718
super.init(rootViewController: rootViewController)
1819

1920
modalPresentationStyle = .overCurrentContext

0 commit comments

Comments
 (0)