From 9df42c763fd0101743dba0cdbf5d4c0855826de0 Mon Sep 17 00:00:00 2001 From: hryeong66 Date: Fri, 24 Jun 2022 23:08:13 +0900 Subject: [PATCH 01/14] =?UTF-8?q?=E2=9C=85[CHORE]=20#233=20-=20podfile=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ChaRo-iOS/Podfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ChaRo-iOS/Podfile.lock b/ChaRo-iOS/Podfile.lock index 884ea989..892e5263 100644 --- a/ChaRo-iOS/Podfile.lock +++ b/ChaRo-iOS/Podfile.lock @@ -209,4 +209,4 @@ SPEC CHECKSUMS: PODFILE CHECKSUM: 4ba9d1763f0672977ce4568f3decdf3e7f199bc3 -COCOAPODS: 1.11.2 +COCOAPODS: 1.11.3 From 0f30781f7f7757e9b1a98bf2d9af65593003f957 Mon Sep 17 00:00:00 2001 From: hryeong66 Date: Sat, 25 Jun 2022 00:04:26 +0900 Subject: [PATCH 02/14] =?UTF-8?q?=E2=9C=85[CHORE]=20#233=20-=20expended=20?= =?UTF-8?q?imgae=20view=EC=97=90=20=EB=93=A4=EC=96=B4=EA=B0=88=20=ED=8C=8C?= =?UTF-8?q?=EC=9D=BC=EB=93=A4=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ChaRo-iOS/ChaRo-iOS.xcodeproj/project.pbxproj | 32 +++++++++++++------ .../ViewModels/ExpendedImageViewModel.swift | 8 +++++ .../PostDetailScene/PostDetailPhotoCVC.swift | 8 +++++ .../VCs/PostDetailScene/ExpendedImageVC.swift | 8 +++++ 4 files changed, 46 insertions(+), 10 deletions(-) create mode 100644 ChaRo-iOS/ChaRo-iOS/Source/ViewModels/ExpendedImageViewModel.swift create mode 100644 ChaRo-iOS/ChaRo-iOS/Source/Views/Cells/CVC/PostDetailScene/PostDetailPhotoCVC.swift create mode 100644 ChaRo-iOS/ChaRo-iOS/Source/Views/VCs/PostDetailScene/ExpendedImageVC.swift diff --git a/ChaRo-iOS/ChaRo-iOS.xcodeproj/project.pbxproj b/ChaRo-iOS/ChaRo-iOS.xcodeproj/project.pbxproj index 877c253f..3156733e 100644 --- a/ChaRo-iOS/ChaRo-iOS.xcodeproj/project.pbxproj +++ b/ChaRo-iOS/ChaRo-iOS.xcodeproj/project.pbxproj @@ -218,6 +218,9 @@ 70FD425F2817158900631BB7 /* UpdateProfileService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 70FD425E2817158900631BB7 /* UpdateProfileService.swift */; }; 70FD4261281715B300631BB7 /* UserDefaultKey.swift in Sources */ = {isa = PBXBuildFile; fileRef = 70FD4260281715B300631BB7 /* UserDefaultKey.swift */; }; 70FD4263281839B400631BB7 /* String+.swift in Sources */ = {isa = PBXBuildFile; fileRef = 70FD4262281839B400631BB7 /* String+.swift */; }; + 7FC2455B2866008A00B3756F /* ExpendedImageVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7FC2455A2866008A00B3756F /* ExpendedImageVC.swift */; }; + 7FC2455D2866013000B3756F /* ExpendedImageViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7FC2455C2866013000B3756F /* ExpendedImageViewModel.swift */; }; + 7FC24560286601F300B3756F /* PostDetailPhotoCVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7FC2455F286601F300B3756F /* PostDetailPhotoCVC.swift */; }; 8B188860E6B0E2739A7DC8FC /* Pods_ChaRo_iOSTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A28755551AA4AA1EE63FA224 /* Pods_ChaRo_iOSTests.framework */; }; DDA7344339CF4453CB1007E6 /* Pods_ChaRo_iOS.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D2D4415326DCA1FAFA4CF005 /* Pods_ChaRo_iOS.framework */; }; F42DA7FD2692235C003DA0DC /* PostTitleDataModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = F42DA7FC2692235C003DA0DC /* PostTitleDataModel.swift */; }; @@ -490,6 +493,9 @@ 70FD425E2817158900631BB7 /* UpdateProfileService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UpdateProfileService.swift; sourceTree = ""; }; 70FD4260281715B300631BB7 /* UserDefaultKey.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserDefaultKey.swift; sourceTree = ""; }; 70FD4262281839B400631BB7 /* String+.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "String+.swift"; sourceTree = ""; }; + 7FC2455A2866008A00B3756F /* ExpendedImageVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExpendedImageVC.swift; sourceTree = ""; }; + 7FC2455C2866013000B3756F /* ExpendedImageViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExpendedImageViewModel.swift; sourceTree = ""; }; + 7FC2455F286601F300B3756F /* PostDetailPhotoCVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PostDetailPhotoCVC.swift; sourceTree = ""; }; 83D65C0CC1D310B45627BC8F /* Pods-ChaRo-iOS.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ChaRo-iOS.release.xcconfig"; path = "Target Support Files/Pods-ChaRo-iOS/Pods-ChaRo-iOS.release.xcconfig"; sourceTree = ""; }; A28755551AA4AA1EE63FA224 /* Pods_ChaRo_iOSTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_ChaRo_iOSTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; D2D4415326DCA1FAFA4CF005 /* Pods_ChaRo_iOS.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_ChaRo_iOS.framework; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -565,13 +571,13 @@ 3610A8902693730700EFC794 /* CVC */ = { isa = PBXGroup; children = ( + 7FC2455E286601DE00B3756F /* PostDetailScene */, 706A671426F358FD001AB884 /* JoinScene */, 3CAE519626C240D800DB8A41 /* CreatePostScene */, 3CAE519B26C2419800DB8A41 /* HomeScene */, 3CAE519D26C241D300DB8A41 /* MyPageScene */, 3CAE519726C240E100DB8A41 /* OnBoardScene */, 3CAE519C26C241B500DB8A41 /* PostSearchScene */, - 36A2FECE278F206800B1D87A /* New Group */, 3610A8912693730700EFC794 /* CommonCVC.swift */, 360937AB2699EF7B005392BB /* TabbarCVC.swift */, 7084948126A23AB7001B3C2B /* CollectionViewFooter.swift */, @@ -602,13 +608,6 @@ path = FollowScene; sourceTree = ""; }; - 36A2FECE278F206800B1D87A /* New Group */ = { - isa = PBXGroup; - children = ( - ); - path = "New Group"; - sourceTree = ""; - }; 36B69F7E2775DC0D00FEEAAE /* FollowScene */ = { isa = PBXGroup; children = ( @@ -1224,6 +1223,7 @@ 3CB532CA27C507C2005AAB1D /* Component */, F49DE532268E148300A8185C /* PostDetailVC.swift */, 3C7A0C4E27CE838100B78854 /* PostLikeListVC.swift */, + 7FC2455A2866008A00B3756F /* ExpendedImageVC.swift */, ); path = PostDetailScene; sourceTree = ""; @@ -1419,6 +1419,7 @@ 3C7A0C5027CE83AE00B78854 /* PostLikeListViewModel.swift */, 3C86C1BA27DF92CE00A41FCE /* PostDetailViewModel.swift */, 3C34CC7027F19B010016069C /* AddressMainViewModel.swift */, + 7FC2455C2866013000B3756F /* ExpendedImageViewModel.swift */, ); path = ViewModels; sourceTree = ""; @@ -1466,6 +1467,14 @@ path = JoinScene; sourceTree = ""; }; + 7FC2455E286601DE00B3756F /* PostDetailScene */ = { + isa = PBXGroup; + children = ( + 7FC2455F286601F300B3756F /* PostDetailPhotoCVC.swift */, + ); + path = PostDetailScene; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -1714,6 +1723,7 @@ 3C597C48280EA0CA007153B0 /* UINavigationController+.swift in Sources */, F42DA80E2694D47F003DA0DC /* PostCourseThemeTVC.swift in Sources */, F4CC1B65269B943B009A0C01 /* CreatePostPhotoTVC.swift in Sources */, + 7FC2455D2866013000B3756F /* ExpendedImageViewModel.swift in Sources */, 3C879BEF268B147D00C41BB8 /* UITableView+.swift in Sources */, 36E445BB277CD6A2008E31BE /* SettingViewDataModel.swift in Sources */, 3C879BF3268B14A800C41BB8 /* UIColor+.swift in Sources */, @@ -1723,6 +1733,7 @@ 7062C83D270C42FE00C1CD2E /* JoinProfileView.swift in Sources */, 7062C849270CC04500C1CD2E /* ValidationEmailModel.swift in Sources */, 36CACA1F2698F3CF007E02CA /* ThemePostDetailTVC.swift in Sources */, + 7FC24560286601F300B3756F /* PostDetailPhotoCVC.swift in Sources */, 70FD4261281715B300631BB7 /* UserDefaultKey.swift in Sources */, 706A671626F35945001AB884 /* JoinViewCVC.swift in Sources */, 7084948526A2441C001B3C2B /* EmptyCVC.swift in Sources */, @@ -1800,6 +1811,7 @@ 70A37C3126EF5FE3006CCEA9 /* JoinVC.swift in Sources */, 3CB532CF27C50950005AAB1D /* ImageLiterals.swift in Sources */, 7062C84B270CDE6F00C1CD2E /* IsDuplicatedNicknameService.swift in Sources */, + 7FC2455B2866008A00B3756F /* ExpendedImageVC.swift in Sources */, 365FEF4927D66C9C0036E182 /* FilterCellView.swift in Sources */, F4CC1B90269C5EFA009A0C01 /* CreatePostPhotosCVC.swift in Sources */, 3C5B15B82749802600F178A8 /* GenericResponse.swift in Sources */, @@ -2045,7 +2057,7 @@ CODE_SIGN_ENTITLEMENTS = "ChaRo-iOS/ChaRo-iOS.entitlements"; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - DEVELOPMENT_TEAM = 2ZS26WP93H; + DEVELOPMENT_TEAM = JCV986BPR5; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)", @@ -2077,7 +2089,7 @@ CODE_SIGN_ENTITLEMENTS = "ChaRo-iOS/ChaRo-iOS.entitlements"; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - DEVELOPMENT_TEAM = 2ZS26WP93H; + DEVELOPMENT_TEAM = JCV986BPR5; "EXCLUDED_ARCHS[sdk=*]" = arm64; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", diff --git a/ChaRo-iOS/ChaRo-iOS/Source/ViewModels/ExpendedImageViewModel.swift b/ChaRo-iOS/ChaRo-iOS/Source/ViewModels/ExpendedImageViewModel.swift new file mode 100644 index 00000000..60089570 --- /dev/null +++ b/ChaRo-iOS/ChaRo-iOS/Source/ViewModels/ExpendedImageViewModel.swift @@ -0,0 +1,8 @@ +// +// ExpendedImageViewModel.swift +// ChaRo-iOS +// +// Created by 장혜령 on 2022/06/24. +// + +import Foundation diff --git a/ChaRo-iOS/ChaRo-iOS/Source/Views/Cells/CVC/PostDetailScene/PostDetailPhotoCVC.swift b/ChaRo-iOS/ChaRo-iOS/Source/Views/Cells/CVC/PostDetailScene/PostDetailPhotoCVC.swift new file mode 100644 index 00000000..4408fa24 --- /dev/null +++ b/ChaRo-iOS/ChaRo-iOS/Source/Views/Cells/CVC/PostDetailScene/PostDetailPhotoCVC.swift @@ -0,0 +1,8 @@ +// +// PostDetailPhotoCVC.swift +// ChaRo-iOS +// +// Created by 장혜령 on 2022/06/24. +// + +import Foundation diff --git a/ChaRo-iOS/ChaRo-iOS/Source/Views/VCs/PostDetailScene/ExpendedImageVC.swift b/ChaRo-iOS/ChaRo-iOS/Source/Views/VCs/PostDetailScene/ExpendedImageVC.swift new file mode 100644 index 00000000..f13c8207 --- /dev/null +++ b/ChaRo-iOS/ChaRo-iOS/Source/Views/VCs/PostDetailScene/ExpendedImageVC.swift @@ -0,0 +1,8 @@ +// +// ExpendedImageVC.swift +// ChaRo-iOS +// +// Created by 장혜령 on 2022/06/24. +// + +import Foundation From 5c7b3f2c25cf2a42b9534f235b1763a7d8760d4f Mon Sep 17 00:00:00 2001 From: hryeong66 Date: Sat, 25 Jun 2022 00:05:34 +0900 Subject: [PATCH 03/14] =?UTF-8?q?=E2=9C=A8[FEAT]=20#233=20-=20Expended=20I?= =?UTF-8?q?mage=20View=20Model=20=EA=B5=AC=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ViewModels/ExpendedImageViewModel.swift | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/ChaRo-iOS/ChaRo-iOS/Source/ViewModels/ExpendedImageViewModel.swift b/ChaRo-iOS/ChaRo-iOS/Source/ViewModels/ExpendedImageViewModel.swift index 60089570..5267e075 100644 --- a/ChaRo-iOS/ChaRo-iOS/Source/ViewModels/ExpendedImageViewModel.swift +++ b/ChaRo-iOS/ChaRo-iOS/Source/ViewModels/ExpendedImageViewModel.swift @@ -6,3 +6,34 @@ // import Foundation +import RxSwift + +class ExpendedImageViewModel { + + private let dismissibleHeight: CGFloat = 300 + private let newHeightSubject = PublishSubject() + + struct Input { + let scrolledOffsetSubject: PublishSubject + } + + struct Output { + let newHeightSubject: PublishSubject + } + + func transform(to input: Input, disposeBag: DisposeBag) -> Output { + input.scrolledOffsetSubject.bind(onNext: { [weak self] yOffset in + let newHeight = self?.calculateNewHeight(with: yOffset) + self?.newHeightSubject.onNext(newHeight) + }).disposed(by: disposeBag) + return Output(newHeightSubject: newHeightSubject) + } + + private func calculateNewHeight(with yOffset: CGFloat) -> CGFloat? { + if yOffset > 0 { + return yOffset > dismissibleHeight ? -1 : yOffset + } + return nil + } + +} From d87972af847ccf007c9f83166453a322b1dd1fd1 Mon Sep 17 00:00:00 2001 From: hryeong66 Date: Sat, 25 Jun 2022 00:06:24 +0900 Subject: [PATCH 04/14] =?UTF-8?q?=20=E2=9C=85[CHORE]=20#233=20-=20postPost?= =?UTF-8?q?TVC=20=EC=84=A0=ED=83=9D=EC=8B=9C=20prestingClosure=20=ED=98=B8?= =?UTF-8?q?=EC=B6=9C=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Views/Cells/TVC/PostDetailScene/PostPhotoTVC.swift | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ChaRo-iOS/ChaRo-iOS/Source/Views/Cells/TVC/PostDetailScene/PostPhotoTVC.swift b/ChaRo-iOS/ChaRo-iOS/Source/Views/Cells/TVC/PostDetailScene/PostPhotoTVC.swift index 3a4e22f3..29614bc9 100644 --- a/ChaRo-iOS/ChaRo-iOS/Source/Views/Cells/TVC/PostDetailScene/PostPhotoTVC.swift +++ b/ChaRo-iOS/ChaRo-iOS/Source/Views/Cells/TVC/PostDetailScene/PostPhotoTVC.swift @@ -13,6 +13,7 @@ import RxSwift final class PostPhotoTVC: UITableViewCell{ // MARK: - properties + var presentingClosure: (() -> ())? private let disposeBag = DisposeBag() private let photoSubject = PublishSubject<[String]>() @@ -77,6 +78,10 @@ final class PostPhotoTVC: UITableViewCell{ cellType: PostPhotoCVC.self)) { row, element, cell in cell.setImage(to: element) }.disposed(by: disposeBag) + + collectionView.rx.itemSelected.bind(onNext: { [weak self] indexPath in + self?.presentingClosure?() + }) } func setContent(imageList: [String]) { From cb7ad3dc1a3722c1626caa2de0497eeea238ac19 Mon Sep 17 00:00:00 2001 From: hryeong66 Date: Sat, 25 Jun 2022 00:07:55 +0900 Subject: [PATCH 05/14] =?UTF-8?q?=20=E2=9C=85[CHORE]=20#233=20-=20PostDeta?= =?UTF-8?q?ilPhotoCVC=20=EC=9E=84=EC=8B=9C=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../PostDetailScene/PostDetailPhotoCVC.swift | 34 ++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/ChaRo-iOS/ChaRo-iOS/Source/Views/Cells/CVC/PostDetailScene/PostDetailPhotoCVC.swift b/ChaRo-iOS/ChaRo-iOS/Source/Views/Cells/CVC/PostDetailScene/PostDetailPhotoCVC.swift index 4408fa24..85dc9965 100644 --- a/ChaRo-iOS/ChaRo-iOS/Source/Views/Cells/CVC/PostDetailScene/PostDetailPhotoCVC.swift +++ b/ChaRo-iOS/ChaRo-iOS/Source/Views/Cells/CVC/PostDetailScene/PostDetailPhotoCVC.swift @@ -5,4 +5,36 @@ // Created by 장혜령 on 2022/06/24. // -import Foundation +import UIKit +import SnapKit +import Then +import Kingfisher + +final class PostDetailPhotoCVC: UICollectionViewCell { + + // MARK: - properties + let imageView = UIImageView().then { + $0.contentMode = .scaleAspectFill + } + + override init(frame: CGRect) { + super.init(frame: frame) + render() + } + + required init?(coder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } + + private func render() { + addSubview(imageView) + imageView.snp.makeConstraints { + $0.top.leading.trailing.bottom.equalToSuperview() + } + } + + func setImage(to url: String) { + let url = URL(string: url) + imageView.kf.setImage(with: url) + } +} From 3ef60974e1db0d0eb2834de5a90591ba91045df3 Mon Sep 17 00:00:00 2001 From: hryeong66 Date: Sat, 25 Jun 2022 00:08:26 +0900 Subject: [PATCH 06/14] =?UTF-8?q?=E2=9C=A8[FEAT]=20#233=20-=20=EC=9D=B4?= =?UTF-8?q?=EB=AF=B8=EC=A7=80=20=ED=81=B4=EB=A6=AD=20=EC=8B=9C=20=EC=9D=B4?= =?UTF-8?q?=EB=AF=B8=EC=A7=80=20=ED=99=95=EB=8C=80=ED=95=98=EC=97=AC=20?= =?UTF-8?q?=EB=B3=B4=EC=97=AC=EC=A3=BC=EB=8A=94=20VC=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../VCs/PostDetailScene/ExpendedImageVC.swift | 166 +++++++++++++++++- 1 file changed, 165 insertions(+), 1 deletion(-) diff --git a/ChaRo-iOS/ChaRo-iOS/Source/Views/VCs/PostDetailScene/ExpendedImageVC.swift b/ChaRo-iOS/ChaRo-iOS/Source/Views/VCs/PostDetailScene/ExpendedImageVC.swift index f13c8207..b10d476c 100644 --- a/ChaRo-iOS/ChaRo-iOS/Source/Views/VCs/PostDetailScene/ExpendedImageVC.swift +++ b/ChaRo-iOS/ChaRo-iOS/Source/Views/VCs/PostDetailScene/ExpendedImageVC.swift @@ -5,4 +5,168 @@ // Created by 장혜령 on 2022/06/24. // -import Foundation +import UIKit +import SnapKit +import Then +import RxSwift + +final class ExpendedImageVC: UIViewController { + + // MARK: - properties + private let disposeBag = DisposeBag() + private let imageList: [String] + private let animator = UIViewPropertyAnimator(duration: 0.4, curve: .easeInOut) + private let scrolledOffsetSubject = PublishSubject() + private let photoSubject = ReplaySubject<[String]>.create(bufferSize: 1) + + private let xmarkButton = UIButton().then { + $0.setImage(ImageLiterals.icBack, for: .normal) + } + + private lazy var photoNumberButton = UIButton().then { + $0.titleLabel?.font = .notoSansMediumFont(ofSize: 15) + $0.setTitleColor(.white, for: .normal) + $0.setTitle("1 / \(imageList.count)", for: .normal) + $0.layer.cornerRadius = 25.0 / 2.0 + $0.backgroundColor = .gray10.withAlphaComponent(0.7) + } + + private lazy var collectionView = UICollectionView(frame: .zero, collectionViewLayout: UICollectionViewFlowLayout()).then { + let layout = UICollectionViewFlowLayout() + let screenWidth = UIScreen.main.bounds.width + layout.itemSize = CGSize(width: screenWidth, height: UIScreen.main.bounds.height) + layout.minimumLineSpacing = 0 + layout.minimumInteritemSpacing = 0 + layout.scrollDirection = .horizontal + $0.setCollectionViewLayout(layout, animated: true) + $0.tintColor = .clear + $0.backgroundColor = .clear + $0.register(cell: PostPhotoCVC.self) + $0.rx.setDelegate(self) + $0.showsHorizontalScrollIndicator = false + $0.isPagingEnabled = true + } + + private let viewModel: ExpendedImageViewModel + + init(imageList: [String]) { + self.imageList = imageList + self.photoSubject.onNext(imageList) + self.viewModel = ExpendedImageViewModel() + super.init() + hidesBottomBarWhenPushed = true + } + + required init?(coder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } + + override func viewDidLoad() { + super.viewDidLoad() + bind() + render() + configUI() + } + + private func render() { + view.addSubviews([collectionView, xmarkButton, photoNumberButton]) + collectionView.snp.makeConstraints { + $0.top.bottom.equalTo(view.safeAreaLayoutGuide) + $0.leading.trailing.equalToSuperview() + } + + xmarkButton.snp.makeConstraints { + $0.top.equalTo(view.safeAreaLayoutGuide).offset(11) + $0.trailing.equalToSuperview().inset(21) + $0.width.height.equalTo(30) + } + + photoNumberButton.snp.makeConstraints { + $0.centerX.equalToSuperview() + $0.bottom.equalTo(view.safeAreaLayoutGuide).inset(4) + $0.width.equalTo(61) + $0.height.equalTo(25) + } + } + + private func configUI() { + view.backgroundColor = .black.withAlphaComponent(0.9) + setupPanGesture() + } + + private func setupPanGesture() { + let panGesture = UIPanGestureRecognizer(target: self, action: #selector(handlePanGesture(gesture:))) + panGesture.delegate = self + view.addGestureRecognizer(panGesture) + } + + @objc + private func handlePanGesture(gesture: UIPanGestureRecognizer) { + let transtionY = gesture.translation(in: view).y + switch gesture.state{ + case .changed: + scrolledOffsetSubject.onNext(transtionY) + case .ended: + animateContainerView(yOffset: 0) + default: + break + } + } + + private func animateContainerView(yOffset: CGFloat) { + collectionView.snp.updateConstraints { + $0.top.equalTo(view.safeAreaLayoutGuide).offset(yOffset) + } + } + + private func animateDismissView() { + animator.addAnimations { + self.view.backgroundColor = .clear + self.collectionView.alpha = 0 + } + animator.addCompletion { _ in + self.dismiss(animated: false) + } + animator.startAnimation() + } + + private func bind() { + photoSubject + .bind(to: collectionView.rx.items(cellIdentifier: PostPhotoCVC.className, + cellType: PostPhotoCVC.self)) { row, element, cell in + cell.setImage(to: element) + + }.disposed(by: disposeBag) + + xmarkButton.rx.tap + .asDriver() + .drive(onNext: { [weak self] _ in + self?.dismiss(animated: true, completion: nil) + }).disposed(by: disposeBag) + + bindToViewModel() + } + + private func bindToViewModel() { + let output = viewModel.transform(to: ExpendedImageViewModel.Input(scrolledOffsetSubject: scrolledOffsetSubject), disposeBag: disposeBag) + output.newHeightSubject + .filter { $0 != nil } + .bind(onNext: { yoffset in + yoffset == -1 ? self.animateDismissView() : self.animateContainerView(yOffset: yoffset ?? 0) + }).disposed(by: disposeBag) + } +} + +extension ExpendedImageVC: UIGestureRecognizerDelegate { + func gestureRecognizer(_ gestureRecognizer: UIGestureRecognizer, shouldRecognizeSimultaneouslyWith otherGestureRecognizer: UIGestureRecognizer) -> Bool { + return true + } +} + +extension ExpendedImageVC: UICollectionViewDelegate { + func scrollViewDidEndDecelerating(_ scrollView: UIScrollView) { + let currentPage = Int(scrollView.contentOffset.x) / Int(scrollView.frame.width) + photoNumberButton.setTitle("\(currentPage + 1) / \(imageList.count)", for: .normal) + } +} + From 0c53a3dc203e8eb203f608993dc18dfa6602f0ef Mon Sep 17 00:00:00 2001 From: hryeong66 Date: Sat, 25 Jun 2022 00:09:05 +0900 Subject: [PATCH 07/14] =?UTF-8?q?=E2=9C=85[CHORE]=20#233=20-=20image=20cel?= =?UTF-8?q?l=20=EC=84=A0=ED=83=9D=EC=8B=9C=20expendedImageVC=EB=A1=9C=20?= =?UTF-8?q?=ED=99=94=EB=A9=B4=20=EC=A0=84=ED=99=98=20=EB=B0=8F=20=EB=8D=B0?= =?UTF-8?q?=EC=9D=B4=ED=84=B0=20=EC=A0=84=EB=8B=AC=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Source/Views/VCs/PostDetailScene/PostDetailVC.swift | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ChaRo-iOS/ChaRo-iOS/Source/Views/VCs/PostDetailScene/PostDetailVC.swift b/ChaRo-iOS/ChaRo-iOS/Source/Views/VCs/PostDetailScene/PostDetailVC.swift index 151820ed..5fd43cd4 100644 --- a/ChaRo-iOS/ChaRo-iOS/Source/Views/VCs/PostDetailScene/PostDetailVC.swift +++ b/ChaRo-iOS/ChaRo-iOS/Source/Views/VCs/PostDetailScene/PostDetailVC.swift @@ -331,7 +331,12 @@ extension PostDetailVC: UITableViewDataSource { case 1: guard let cell = tableView.dequeueReusableCell(withType: PostPhotoTVC.self, for: indexPath) else { return UITableViewCell() } - cell.setContent(imageList: [additionalData.image] + postData.images) + let imageList = [additionalData.image] + postData.images + cell.setContent(imageList: imageList) + cell.presentingClosure = { [weak self] in + let nextVC = ExpendedImageVC(imageList: imageList) + self?.navigationController?.pushViewController(nextVC, animated: true) + } return cell case 2: From 64e0b140d0f90a61c659e2bc9910ec2ea1fefa24 Mon Sep 17 00:00:00 2001 From: hryeong66 Date: Sat, 25 Jun 2022 00:10:43 +0900 Subject: [PATCH 08/14] =?UTF-8?q?=E2=9C=85[CHORE]=20#233=20-=20podfile.loc?= =?UTF-8?q?k=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ChaRo-iOS/Podfile.lock | 182 +++++++++++++++++++++-------------------- 1 file changed, 94 insertions(+), 88 deletions(-) diff --git a/ChaRo-iOS/Podfile.lock b/ChaRo-iOS/Podfile.lock index 892e5263..6c03e1c5 100644 --- a/ChaRo-iOS/Podfile.lock +++ b/ChaRo-iOS/Podfile.lock @@ -1,88 +1,92 @@ PODS: - - Alamofire (5.5.0) - - AppAuth (1.4.0): - - AppAuth/Core (= 1.4.0) - - AppAuth/ExternalUserAgent (= 1.4.0) - - AppAuth/Core (1.4.0) - - AppAuth/ExternalUserAgent (1.4.0) - - Firebase/Analytics (8.12.1): + - Alamofire (5.6.1) + - AppAuth (1.5.0): + - AppAuth/Core (= 1.5.0) + - AppAuth/ExternalUserAgent (= 1.5.0) + - AppAuth/Core (1.5.0) + - AppAuth/ExternalUserAgent (1.5.0): + - AppAuth/Core + - Firebase/Analytics (9.1.0): - Firebase/Core - - Firebase/Core (8.12.1): + - Firebase/Core (9.1.0): - Firebase/CoreOnly - - FirebaseAnalytics (~> 8.12.0) - - Firebase/CoreOnly (8.12.1): - - FirebaseCore (= 8.12.1) - - Firebase/Messaging (8.12.1): + - FirebaseAnalytics (~> 9.1.0) + - Firebase/CoreOnly (9.1.0): + - FirebaseCore (= 9.1.0) + - Firebase/Messaging (9.1.0): - Firebase/CoreOnly - - FirebaseMessaging (~> 8.12.0) - - FirebaseAnalytics (8.12.0): - - FirebaseAnalytics/AdIdSupport (= 8.12.0) - - FirebaseCore (~> 8.0) - - FirebaseInstallations (~> 8.0) + - FirebaseMessaging (~> 9.1.0) + - FirebaseAnalytics (9.1.0): + - FirebaseAnalytics/AdIdSupport (= 9.1.0) + - FirebaseCore (~> 9.0) + - FirebaseInstallations (~> 9.0) - GoogleUtilities/AppDelegateSwizzler (~> 7.7) - GoogleUtilities/MethodSwizzler (~> 7.7) - GoogleUtilities/Network (~> 7.7) - "GoogleUtilities/NSData+zlib (~> 7.7)" - - nanopb (~> 2.30908.0) - - FirebaseAnalytics/AdIdSupport (8.12.0): - - FirebaseCore (~> 8.0) - - FirebaseInstallations (~> 8.0) - - GoogleAppMeasurement (= 8.12.0) + - nanopb (< 2.30910.0, >= 2.30908.0) + - FirebaseAnalytics/AdIdSupport (9.1.0): + - FirebaseCore (~> 9.0) + - FirebaseInstallations (~> 9.0) + - GoogleAppMeasurement (= 9.1.0) - GoogleUtilities/AppDelegateSwizzler (~> 7.7) - GoogleUtilities/MethodSwizzler (~> 7.7) - GoogleUtilities/Network (~> 7.7) - "GoogleUtilities/NSData+zlib (~> 7.7)" - - nanopb (~> 2.30908.0) - - FirebaseCore (8.12.1): - - FirebaseCoreDiagnostics (~> 8.0) + - nanopb (< 2.30910.0, >= 2.30908.0) + - FirebaseCore (9.1.0): + - FirebaseCoreDiagnostics (~> 9.0) + - FirebaseCoreInternal (~> 9.0) - GoogleUtilities/Environment (~> 7.7) - GoogleUtilities/Logger (~> 7.7) - - FirebaseCoreDiagnostics (8.12.0): - - GoogleDataTransport (~> 9.1) + - FirebaseCoreDiagnostics (9.1.0): + - GoogleDataTransport (< 10.0.0, >= 9.1.4) - GoogleUtilities/Environment (~> 7.7) - GoogleUtilities/Logger (~> 7.7) - - nanopb (~> 2.30908.0) - - FirebaseInstallations (8.12.0): - - FirebaseCore (~> 8.0) + - nanopb (< 2.30910.0, >= 2.30908.0) + - FirebaseCoreInternal (9.1.0): + - "GoogleUtilities/NSData+zlib (~> 7.7)" + - FirebaseInstallations (9.1.0): + - FirebaseCore (~> 9.0) - GoogleUtilities/Environment (~> 7.7) - GoogleUtilities/UserDefaults (~> 7.7) - - PromisesObjC (< 3.0, >= 1.2) - - FirebaseMessaging (8.12.0): - - FirebaseCore (~> 8.0) - - FirebaseInstallations (~> 8.0) - - GoogleDataTransport (~> 9.1) + - PromisesObjC (~> 2.1) + - FirebaseMessaging (9.1.0): + - FirebaseCore (~> 9.0) + - FirebaseInstallations (~> 9.0) + - GoogleDataTransport (< 10.0.0, >= 9.1.4) - GoogleUtilities/AppDelegateSwizzler (~> 7.7) - GoogleUtilities/Environment (~> 7.7) - GoogleUtilities/Reachability (~> 7.7) - GoogleUtilities/UserDefaults (~> 7.7) - - nanopb (~> 2.30908.0) - - GoogleAppMeasurement (8.12.0): - - GoogleAppMeasurement/AdIdSupport (= 8.12.0) + - nanopb (< 2.30910.0, >= 2.30908.0) + - GoogleAppMeasurement (9.1.0): + - GoogleAppMeasurement/AdIdSupport (= 9.1.0) - GoogleUtilities/AppDelegateSwizzler (~> 7.7) - GoogleUtilities/MethodSwizzler (~> 7.7) - GoogleUtilities/Network (~> 7.7) - "GoogleUtilities/NSData+zlib (~> 7.7)" - - nanopb (~> 2.30908.0) - - GoogleAppMeasurement/AdIdSupport (8.12.0): - - GoogleAppMeasurement/WithoutAdIdSupport (= 8.12.0) + - nanopb (< 2.30910.0, >= 2.30908.0) + - GoogleAppMeasurement/AdIdSupport (9.1.0): + - GoogleAppMeasurement/WithoutAdIdSupport (= 9.1.0) - GoogleUtilities/AppDelegateSwizzler (~> 7.7) - GoogleUtilities/MethodSwizzler (~> 7.7) - GoogleUtilities/Network (~> 7.7) - "GoogleUtilities/NSData+zlib (~> 7.7)" - - nanopb (~> 2.30908.0) - - GoogleAppMeasurement/WithoutAdIdSupport (8.12.0): + - nanopb (< 2.30910.0, >= 2.30908.0) + - GoogleAppMeasurement/WithoutAdIdSupport (9.1.0): - GoogleUtilities/AppDelegateSwizzler (~> 7.7) - GoogleUtilities/MethodSwizzler (~> 7.7) - GoogleUtilities/Network (~> 7.7) - "GoogleUtilities/NSData+zlib (~> 7.7)" - - nanopb (~> 2.30908.0) - - GoogleDataTransport (9.1.2): - - GoogleUtilities/Environment (~> 7.2) - - nanopb (~> 2.30908.0) + - nanopb (< 2.30910.0, >= 2.30908.0) + - GoogleDataTransport (9.1.4): + - GoogleUtilities/Environment (~> 7.7) + - nanopb (< 2.30910.0, >= 2.30908.0) - PromisesObjC (< 3.0, >= 1.2) - - GoogleSignIn (6.1.0): - - AppAuth (~> 1.4) - - GTMAppAuth (~> 1.0) + - GoogleSignIn (6.2.2): + - AppAuth (~> 1.5) + - GTMAppAuth (~> 1.3) - GTMSessionFetcher/Core (~> 1.1) - GoogleUtilities/AppDelegateSwizzler (7.7.0): - GoogleUtilities/Environment @@ -103,29 +107,29 @@ PODS: - GoogleUtilities/Logger - GoogleUtilities/UserDefaults (7.7.0): - GoogleUtilities/Logger - - GTMAppAuth (1.2.2): + - GTMAppAuth (1.3.0): - AppAuth/Core (~> 1.4) - GTMSessionFetcher/Core (~> 1.5) - - GTMSessionFetcher/Core (1.7.0) - - KakaoSDKAuth (2.8.6): - - KakaoSDKCommon (= 2.8.6) - - KakaoSDKCommon (2.8.6): - - KakaoSDKCommon/Common (= 2.8.6) - - KakaoSDKCommon/Network (= 2.8.6) - - KakaoSDKCommon/Common (2.8.6) - - KakaoSDKCommon/Network (2.8.6): + - GTMSessionFetcher/Core (1.7.2) + - KakaoSDKAuth (2.10.1): + - KakaoSDKCommon (= 2.10.1) + - KakaoSDKCommon (2.10.1): + - KakaoSDKCommon/Common (= 2.10.1) + - KakaoSDKCommon/Network (= 2.10.1) + - KakaoSDKCommon/Common (2.10.1) + - KakaoSDKCommon/Network (2.10.1): - Alamofire (~> 5.1) - - KakaoSDKCommon/Common (= 2.8.6) - - KakaoSDKUser (2.8.6): - - KakaoSDKAuth (= 2.8.6) + - KakaoSDKCommon/Common (= 2.10.1) + - KakaoSDKUser (2.10.1): + - KakaoSDKAuth (= 2.10.1) - Kingfisher (6.3.1) - lottie-ios (3.3.0) - - nanopb (2.30908.0): - - nanopb/decode (= 2.30908.0) - - nanopb/encode (= 2.30908.0) - - nanopb/decode (2.30908.0) - - nanopb/encode (2.30908.0) - - PromisesObjC (2.0.0) + - nanopb (2.30909.0): + - nanopb/decode (= 2.30909.0) + - nanopb/encode (= 2.30909.0) + - nanopb/decode (2.30909.0) + - nanopb/encode (2.30909.0) + - PromisesObjC (2.1.0) - RxCocoa (6.2.0): - RxRelay (= 6.2.0) - RxSwift (= 6.2.0) @@ -133,7 +137,7 @@ PODS: - RxSwift (= 6.2.0) - RxSwift (6.2.0) - SnapKit (5.0.1) - - Then (2.7.0) + - Then (3.0.0) DEPENDENCIES: - Alamofire (~> 5.0) @@ -158,6 +162,7 @@ SPEC REPOS: - FirebaseAnalytics - FirebaseCore - FirebaseCoreDiagnostics + - FirebaseCoreInternal - FirebaseInstallations - FirebaseMessaging - GoogleAppMeasurement @@ -180,32 +185,33 @@ SPEC REPOS: - Then SPEC CHECKSUMS: - Alamofire: 1c4fb5369c3fe93d2857c780d8bbe09f06f97e7c - AppAuth: 31bcec809a638d7bd2f86ea8a52bd45f6e81e7c7 - Firebase: 580d09e8edafc3073ebf09c03fd42e4d80d35fe9 - FirebaseAnalytics: bd10d7706ba8d6e01ea2816f8fe9e9b881cb0918 - FirebaseCore: 8138de860a90ca7eec5e324da5788fb0ebf1d93c - FirebaseCoreDiagnostics: 3b40dfadef5b90433a60ae01f01e90fe87aa76aa - FirebaseInstallations: 25764cf322e77f99449395870a65b2bef88e1545 - FirebaseMessaging: 23db8bf05585e929ada8af0f0968933c25252808 - GoogleAppMeasurement: ae033c3aad67e68294369373056b4d74cc8ae0d6 - GoogleDataTransport: 629c20a4d363167143f30ea78320d5a7eb8bd940 - GoogleSignIn: c90b5bec45e780f54c6a8e1e3c182a86e3dda69d + Alamofire: 87bd8c952f9a4454320fce00d9cc3de57bcadaf5 + AppAuth: 80317d99ac7ff2801a2f18ff86b48cd315ed465d + Firebase: 91c243d75573ac6e7c9735ec859b72bffb61347d + FirebaseAnalytics: bf11064790ac96804df1df9ddc0ae45af950d9fc + FirebaseCore: b7bfc258e996eada23b3666bd6b9a22ca092acb8 + FirebaseCoreDiagnostics: 2dabba3412b23b524823325739f45e520f67d1e7 + FirebaseCoreInternal: f3c838ae0b41cd840bbf34f90debfede78d352e5 + FirebaseInstallations: a91c74276b544524ce144c8315d8cdbce2dbe30b + FirebaseMessaging: 0bf5caa621182ccc66ba3be3b15e68d800d98e9f + GoogleAppMeasurement: 8ecc717f2abe3f9ee95a5d38db08827852894acc + GoogleDataTransport: 5fffe35792f8b96ec8d6775f5eccd83c998d5a3b + GoogleSignIn: 3c68388ac221f379676e8f1cb115df3aaf73b93f GoogleUtilities: e0913149f6b0625b553d70dae12b49fc62914fd1 - GTMAppAuth: ad5c2b70b9a8689e1a04033c9369c4915bfcbe89 - GTMSessionFetcher: 43748f93435c2aa068b1cbe39655aaf600652e91 - KakaoSDKAuth: 53e747a3bf343a3f3e87b14478d5a865d6c2acae - KakaoSDKCommon: 7e56600ff4c1bd82bed93fea4299b5a37f47e6a5 - KakaoSDKUser: e79480355fa789f42e628dfba359fc21e9914f4c + GTMAppAuth: 4d8f864896f3646f0c33baf38a28362f4c601e15 + GTMSessionFetcher: 5595ec75acf5be50814f81e9189490412bad82ba + KakaoSDKAuth: b4fec62192c2ac8a9375847f666c0932e38afeb5 + KakaoSDKCommon: 4989e3bae5f4884903bc1df7134e13d0e903d587 + KakaoSDKUser: 5c5fd4b5864e8b5ac9587fdbb473daf2fa675abf Kingfisher: 016c8b653a35add51dd34a3aba36b580041acc74 lottie-ios: 6ac74dcc09904798f59b18cb3075c089d76be9ae - nanopb: a0ba3315591a9ae0a16a309ee504766e90db0c96 - PromisesObjC: 68159ce6952d93e17b2dfe273b8c40907db5ba58 + nanopb: b552cce312b6c8484180ef47159bc0f65a1f0431 + PromisesObjC: 99b6f43f9e1044bd87a95a60beff28c2c44ddb72 RxCocoa: 4baf94bb35f2c0ab31bc0cb9f1900155f646ba42 RxRelay: e72dbfd157807478401ef1982e1c61c945c94b2f RxSwift: d356ab7bee873611322f134c5f9ef379fa183d8f SnapKit: 97b92857e3df3a0c71833cce143274bf6ef8e5eb - Then: acfe0be7e98221c6204e12f8161459606d5d822d + Then: 844265ae87834bbe1147d91d5d41a404da2ec27d PODFILE CHECKSUM: 4ba9d1763f0672977ce4568f3decdf3e7f199bc3 From ff0a3e393071830cedcfd4885df3ae3f8b1a276a Mon Sep 17 00:00:00 2001 From: hryeong66 Date: Sat, 25 Jun 2022 00:20:47 +0900 Subject: [PATCH 09/14] =?UTF-8?q?=E2=9A=B0=EF=B8=8F=20[DEL]=20#233=20-=20a?= =?UTF-8?q?ppleLogo.svg=20=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ChaRo-iOS/ChaRo-iOS.xcworkspace/appleLogo.svg | 5 ----- 1 file changed, 5 deletions(-) delete mode 100644 ChaRo-iOS/ChaRo-iOS.xcworkspace/appleLogo.svg diff --git a/ChaRo-iOS/ChaRo-iOS.xcworkspace/appleLogo.svg b/ChaRo-iOS/ChaRo-iOS.xcworkspace/appleLogo.svg deleted file mode 100644 index 4a362466..00000000 --- a/ChaRo-iOS/ChaRo-iOS.xcworkspace/appleLogo.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - - - From f4afbfa1d29998ba5449e5879cce020011e8b362 Mon Sep 17 00:00:00 2001 From: hryeong66 Date: Sat, 25 Jun 2022 00:47:36 +0900 Subject: [PATCH 10/14] =?UTF-8?q?=E2=9A=B0=EF=B8=8F=20[DEL]=20#233=20-=20?= =?UTF-8?q?=EC=82=AC=EC=9A=A9=ED=95=98=EC=A7=80=20=EC=95=8A=EB=8A=94=20ima?= =?UTF-8?q?ge=20Cell=20=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ChaRo-iOS/ChaRo-iOS.xcodeproj/project.pbxproj | 14 +------ .../PostDetailScene/PostDetailPhotoCVC.swift | 40 ------------------- 2 files changed, 1 insertion(+), 53 deletions(-) delete mode 100644 ChaRo-iOS/ChaRo-iOS/Source/Views/Cells/CVC/PostDetailScene/PostDetailPhotoCVC.swift diff --git a/ChaRo-iOS/ChaRo-iOS.xcodeproj/project.pbxproj b/ChaRo-iOS/ChaRo-iOS.xcodeproj/project.pbxproj index 3156733e..833b0427 100644 --- a/ChaRo-iOS/ChaRo-iOS.xcodeproj/project.pbxproj +++ b/ChaRo-iOS/ChaRo-iOS.xcodeproj/project.pbxproj @@ -220,7 +220,6 @@ 70FD4263281839B400631BB7 /* String+.swift in Sources */ = {isa = PBXBuildFile; fileRef = 70FD4262281839B400631BB7 /* String+.swift */; }; 7FC2455B2866008A00B3756F /* ExpendedImageVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7FC2455A2866008A00B3756F /* ExpendedImageVC.swift */; }; 7FC2455D2866013000B3756F /* ExpendedImageViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7FC2455C2866013000B3756F /* ExpendedImageViewModel.swift */; }; - 7FC24560286601F300B3756F /* PostDetailPhotoCVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7FC2455F286601F300B3756F /* PostDetailPhotoCVC.swift */; }; 8B188860E6B0E2739A7DC8FC /* Pods_ChaRo_iOSTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A28755551AA4AA1EE63FA224 /* Pods_ChaRo_iOSTests.framework */; }; DDA7344339CF4453CB1007E6 /* Pods_ChaRo_iOS.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D2D4415326DCA1FAFA4CF005 /* Pods_ChaRo_iOS.framework */; }; F42DA7FD2692235C003DA0DC /* PostTitleDataModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = F42DA7FC2692235C003DA0DC /* PostTitleDataModel.swift */; }; @@ -495,7 +494,6 @@ 70FD4262281839B400631BB7 /* String+.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "String+.swift"; sourceTree = ""; }; 7FC2455A2866008A00B3756F /* ExpendedImageVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExpendedImageVC.swift; sourceTree = ""; }; 7FC2455C2866013000B3756F /* ExpendedImageViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExpendedImageViewModel.swift; sourceTree = ""; }; - 7FC2455F286601F300B3756F /* PostDetailPhotoCVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PostDetailPhotoCVC.swift; sourceTree = ""; }; 83D65C0CC1D310B45627BC8F /* Pods-ChaRo-iOS.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ChaRo-iOS.release.xcconfig"; path = "Target Support Files/Pods-ChaRo-iOS/Pods-ChaRo-iOS.release.xcconfig"; sourceTree = ""; }; A28755551AA4AA1EE63FA224 /* Pods_ChaRo_iOSTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_ChaRo_iOSTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; D2D4415326DCA1FAFA4CF005 /* Pods_ChaRo_iOS.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_ChaRo_iOS.framework; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -571,7 +569,6 @@ 3610A8902693730700EFC794 /* CVC */ = { isa = PBXGroup; children = ( - 7FC2455E286601DE00B3756F /* PostDetailScene */, 706A671426F358FD001AB884 /* JoinScene */, 3CAE519626C240D800DB8A41 /* CreatePostScene */, 3CAE519B26C2419800DB8A41 /* HomeScene */, @@ -1467,14 +1464,6 @@ path = JoinScene; sourceTree = ""; }; - 7FC2455E286601DE00B3756F /* PostDetailScene */ = { - isa = PBXGroup; - children = ( - 7FC2455F286601F300B3756F /* PostDetailPhotoCVC.swift */, - ); - path = PostDetailScene; - sourceTree = ""; - }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -1733,7 +1722,6 @@ 7062C83D270C42FE00C1CD2E /* JoinProfileView.swift in Sources */, 7062C849270CC04500C1CD2E /* ValidationEmailModel.swift in Sources */, 36CACA1F2698F3CF007E02CA /* ThemePostDetailTVC.swift in Sources */, - 7FC24560286601F300B3756F /* PostDetailPhotoCVC.swift in Sources */, 70FD4261281715B300631BB7 /* UserDefaultKey.swift in Sources */, 706A671626F35945001AB884 /* JoinViewCVC.swift in Sources */, 7084948526A2441C001B3C2B /* EmptyCVC.swift in Sources */, @@ -2057,7 +2045,7 @@ CODE_SIGN_ENTITLEMENTS = "ChaRo-iOS/ChaRo-iOS.entitlements"; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - DEVELOPMENT_TEAM = JCV986BPR5; + DEVELOPMENT_TEAM = J8A843466G; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)", diff --git a/ChaRo-iOS/ChaRo-iOS/Source/Views/Cells/CVC/PostDetailScene/PostDetailPhotoCVC.swift b/ChaRo-iOS/ChaRo-iOS/Source/Views/Cells/CVC/PostDetailScene/PostDetailPhotoCVC.swift deleted file mode 100644 index 85dc9965..00000000 --- a/ChaRo-iOS/ChaRo-iOS/Source/Views/Cells/CVC/PostDetailScene/PostDetailPhotoCVC.swift +++ /dev/null @@ -1,40 +0,0 @@ -// -// PostDetailPhotoCVC.swift -// ChaRo-iOS -// -// Created by 장혜령 on 2022/06/24. -// - -import UIKit -import SnapKit -import Then -import Kingfisher - -final class PostDetailPhotoCVC: UICollectionViewCell { - - // MARK: - properties - let imageView = UIImageView().then { - $0.contentMode = .scaleAspectFill - } - - override init(frame: CGRect) { - super.init(frame: frame) - render() - } - - required init?(coder: NSCoder) { - fatalError("init(coder:) has not been implemented") - } - - private func render() { - addSubview(imageView) - imageView.snp.makeConstraints { - $0.top.leading.trailing.bottom.equalToSuperview() - } - } - - func setImage(to url: String) { - let url = URL(string: url) - imageView.kf.setImage(with: url) - } -} From 5468420d9a74155e598c296956ab263cf57674c6 Mon Sep 17 00:00:00 2001 From: hryeong66 Date: Sat, 25 Jun 2022 00:48:11 +0900 Subject: [PATCH 11/14] =?UTF-8?q?=E2=9C=85[CHORE]=20#233=20-=20=EC=99=B8?= =?UTF-8?q?=EB=B6=80=EC=97=90=EC=84=9C=20image=20content=20mode=20?= =?UTF-8?q?=EB=B3=80=EA=B2=BD=ED=95=A0=20=EC=88=98=20=EC=9E=88=EB=8F=84?= =?UTF-8?q?=EB=A1=9D=20private=20=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Source/Views/Cells/TVC/PostDetailScene/PostPhotoCVC.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ChaRo-iOS/ChaRo-iOS/Source/Views/Cells/TVC/PostDetailScene/PostPhotoCVC.swift b/ChaRo-iOS/ChaRo-iOS/Source/Views/Cells/TVC/PostDetailScene/PostPhotoCVC.swift index b790d5c3..20ee9f0f 100644 --- a/ChaRo-iOS/ChaRo-iOS/Source/Views/Cells/TVC/PostDetailScene/PostPhotoCVC.swift +++ b/ChaRo-iOS/ChaRo-iOS/Source/Views/Cells/TVC/PostDetailScene/PostPhotoCVC.swift @@ -11,7 +11,7 @@ import Then final class PostPhotoCVC: UICollectionViewCell{ - private let imageView = UIImageView().then { + let imageView = UIImageView().then { $0.contentMode = .scaleAspectFill } From b08e8225eabe49856005e6e0938b438e74153a94 Mon Sep 17 00:00:00 2001 From: hryeong66 Date: Sat, 25 Jun 2022 00:49:15 +0900 Subject: [PATCH 12/14] =?UTF-8?q?=E2=9C=85[CHORE]=20#233=20-=20=EC=9E=90?= =?UTF-8?q?=EB=8F=99=EB=A1=9C=EA=B7=B8=EC=9D=B8=20=EC=9E=84=EC=8B=9C=20tes?= =?UTF-8?q?t=EC=9A=A9=20=EA=B3=84=EC=A0=95=20=EC=B6=94=EA=B0=80=20?= =?UTF-8?q?=EA=B0=9C=EB=B0=9C=20=EC=99=84=EB=A3=8C=20=ED=9B=84=20=EC=82=AD?= =?UTF-8?q?=EC=A0=9C=20=ED=95=84=EC=9A=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ChaRo-iOS/ChaRo-iOS/Source/Views/VCs/SignScene/LoginVC.swift | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ChaRo-iOS/ChaRo-iOS/Source/Views/VCs/SignScene/LoginVC.swift b/ChaRo-iOS/ChaRo-iOS/Source/Views/VCs/SignScene/LoginVC.swift index 7117ada2..b27db51f 100644 --- a/ChaRo-iOS/ChaRo-iOS/Source/Views/VCs/SignScene/LoginVC.swift +++ b/ChaRo-iOS/ChaRo-iOS/Source/Views/VCs/SignScene/LoginVC.swift @@ -34,8 +34,13 @@ class LoginVC: UIViewController { configureLoginButtonUI() configureTextfieldUI() configureNotificationCenter() + addTestUserAccount() } + private func addTestUserAccount() { + self.idTextField.text = "gpfud1998@naver.com" + self.pwdTextField.text = "charo0505" + } override func viewDidDisappear(_ animated: Bool) { removeObservers() } From 465c8ecb267e01f1765dde4f26cf55aa5bcc53b3 Mon Sep 17 00:00:00 2001 From: hryeong66 Date: Sat, 25 Jun 2022 00:50:15 +0900 Subject: [PATCH 13/14] =?UTF-8?q?=E2=9C=85[CHORE]=20#233=20-=20expended=20?= =?UTF-8?q?image=20ui=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Views/VCs/PostDetailScene/ExpendedImageVC.swift | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/ChaRo-iOS/ChaRo-iOS/Source/Views/VCs/PostDetailScene/ExpendedImageVC.swift b/ChaRo-iOS/ChaRo-iOS/Source/Views/VCs/PostDetailScene/ExpendedImageVC.swift index b10d476c..451f58af 100644 --- a/ChaRo-iOS/ChaRo-iOS/Source/Views/VCs/PostDetailScene/ExpendedImageVC.swift +++ b/ChaRo-iOS/ChaRo-iOS/Source/Views/VCs/PostDetailScene/ExpendedImageVC.swift @@ -20,7 +20,7 @@ final class ExpendedImageVC: UIViewController { private let photoSubject = ReplaySubject<[String]>.create(bufferSize: 1) private let xmarkButton = UIButton().then { - $0.setImage(ImageLiterals.icBack, for: .normal) + $0.setImage(ImageLiterals.icCloseWhite, for: .normal) } private lazy var photoNumberButton = UIButton().then { @@ -53,8 +53,7 @@ final class ExpendedImageVC: UIViewController { self.imageList = imageList self.photoSubject.onNext(imageList) self.viewModel = ExpendedImageViewModel() - super.init() - hidesBottomBarWhenPushed = true + super.init(nibName: nil, bundle: nil) } required init?(coder: NSCoder) { @@ -77,13 +76,13 @@ final class ExpendedImageVC: UIViewController { xmarkButton.snp.makeConstraints { $0.top.equalTo(view.safeAreaLayoutGuide).offset(11) - $0.trailing.equalToSuperview().inset(21) - $0.width.height.equalTo(30) + $0.trailing.equalToSuperview().inset(10) + $0.width.height.equalTo(50) } photoNumberButton.snp.makeConstraints { $0.centerX.equalToSuperview() - $0.bottom.equalTo(view.safeAreaLayoutGuide).inset(4) + $0.bottom.equalTo(view.safeAreaLayoutGuide).inset(20) $0.width.equalTo(61) $0.height.equalTo(25) } @@ -134,8 +133,8 @@ final class ExpendedImageVC: UIViewController { photoSubject .bind(to: collectionView.rx.items(cellIdentifier: PostPhotoCVC.className, cellType: PostPhotoCVC.self)) { row, element, cell in + cell.imageView.contentMode = .scaleAspectFit cell.setImage(to: element) - }.disposed(by: disposeBag) xmarkButton.rx.tap From 01ad4d04af8af349cd20833342471b7e47040014 Mon Sep 17 00:00:00 2001 From: hryeong66 Date: Sat, 25 Jun 2022 00:50:56 +0900 Subject: [PATCH 14/14] =?UTF-8?q?=E2=9C=85[CHORE]=20#233=20-=20expended=20?= =?UTF-8?q?image=20vc=EB=A1=9C=20push=20=EB=8C=80=EC=8B=A0=20present=20?= =?UTF-8?q?=ED=95=98=EB=8F=84=EB=A1=9D=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Source/Views/VCs/PostDetailScene/PostDetailVC.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ChaRo-iOS/ChaRo-iOS/Source/Views/VCs/PostDetailScene/PostDetailVC.swift b/ChaRo-iOS/ChaRo-iOS/Source/Views/VCs/PostDetailScene/PostDetailVC.swift index 5fd43cd4..38686759 100644 --- a/ChaRo-iOS/ChaRo-iOS/Source/Views/VCs/PostDetailScene/PostDetailVC.swift +++ b/ChaRo-iOS/ChaRo-iOS/Source/Views/VCs/PostDetailScene/PostDetailVC.swift @@ -335,7 +335,8 @@ extension PostDetailVC: UITableViewDataSource { cell.setContent(imageList: imageList) cell.presentingClosure = { [weak self] in let nextVC = ExpendedImageVC(imageList: imageList) - self?.navigationController?.pushViewController(nextVC, animated: true) + nextVC.modalPresentationStyle = .fullScreen + self?.present(nextVC, animated: true) } return cell