Skip to content

Commit 7bb529d

Browse files
committed
refactor : 기타 변경사항 #7
- EditSentence 모달이 띄워졌을 때 백그라운드 탭 임시 비활성화 - EditSentence 모달 Corner Radius 적용 - attachEditSentence() 중복요청 에러 방지용 조건문 추가
1 parent 29d4159 commit 7bb529d

File tree

4 files changed

+11
-2
lines changed

4 files changed

+11
-2
lines changed

Particle/Particle/Main/HomeTab/AddArticle/SelectSentence/EditSentence/EditSentenceViewController.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,7 @@ final class EditSentenceViewController: UIViewController, EditSentencePresentabl
138138

139139
private func setupInitialView() {
140140
view.backgroundColor = .init(hex: 0x1F1F1F)
141+
view.addRoundedCorner(corners: [.topLeft, .topRight], radius: 24)
141142
addSubviews()
142143
setConstraints()
143144
}
@@ -256,7 +257,10 @@ import SwiftUI
256257
@available(iOS 13.0, *)
257258
struct EditSentenceViewController_Preview: PreviewProvider {
258259
static var previews: some View {
259-
EditSentenceViewController(with: "테스트 문구").showPreview()
260+
EditSentenceViewController(
261+
with: "테스트 문구"
262+
)
263+
.showPreview()
260264
}
261265
}
262266
#endif

Particle/Particle/Main/HomeTab/AddArticle/SelectSentence/EditSentence/ModalStyle/EditSentencePresentationController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ final class EditSentencePresentationController: UIPresentationController {
4949
guard let superview = presentingViewController.view else { return }
5050
superview.addSubview(dimmingView)
5151
setupDimmingViewLayout(in: superview)
52-
adoptTapGestureRecognizer()
52+
// adoptTapGestureRecognizer() // FIXME: dimmingView 탭시, 모달 dismiss 기능을 막아둠
5353
dimmingView.alpha = 0
5454

5555
presentingViewController.transitionCoordinator?.animate(

Particle/Particle/Main/HomeTab/AddArticle/SelectSentence/SelectSentenceRouter.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ final class SelectSentenceRouter: ViewableRouter<SelectSentenceInteractable,
3434
}
3535

3636
func attachEditSentence(with text: String) {
37+
if currentChild != nil {
38+
return
39+
}
3740
let editSentence = editSentenceBuilder.build(withListener: interactor, text: text)
3841
self.currentChild = editSentence
3942
attachChild(editSentence)

Particle/Particle/Main/HomeTab/AddArticle/SelectSentence/SelectSentenceViewController.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,10 +107,12 @@ final class SelectSentenceViewController: UIViewController,
107107
return collectionView
108108
}()
109109

110+
private let selectedImages: [PHAsset]
110111

111112
// MARK: - Initializers
112113

113114
init(selectedImages: [PHAsset]) {
115+
self.selectedImages = selectedImages
114116
super.init(nibName: nil, bundle: nil)
115117
}
116118

0 commit comments

Comments
 (0)