diff --git a/Runnect-iOS/.swiftlint.yml b/Runnect-iOS/.swiftlint.yml index 9057c5bf..b4b8db1c 100644 --- a/Runnect-iOS/.swiftlint.yml +++ b/Runnect-iOS/.swiftlint.yml @@ -5,7 +5,6 @@ disabled_rules: - type_name - legacy_constructor - unused_setter_value - - force_try included: - Runnect-iOS diff --git a/Runnect-iOS/Runnect-iOS.xcodeproj/project.pbxproj b/Runnect-iOS/Runnect-iOS.xcodeproj/project.pbxproj index 0054dd2e..e4476e8f 100644 --- a/Runnect-iOS/Runnect-iOS.xcodeproj/project.pbxproj +++ b/Runnect-iOS/Runnect-iOS.xcodeproj/project.pbxproj @@ -14,9 +14,7 @@ A3BC2F2F2962C40A00198261 /* UploadedCourseInfoVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = A3BC2F2E2962C40A00198261 /* UploadedCourseInfoVC.swift */; }; A3BC2F322962E0DB00198261 /* GoalRewardInfoModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A3BC2F312962E0DB00198261 /* GoalRewardInfoModel.swift */; }; A3BC2F34296303A600198261 /* GoalRewardInfoCVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = A3BC2F33296303A600198261 /* GoalRewardInfoCVC.swift */; }; - A3BC2F382963CE3700198261 /* ActivityRecordInfoModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A3BC2F372963CE3700198261 /* ActivityRecordInfoModel.swift */; }; A3BC2F3A2963D0ED00198261 /* ActivityRecordInfoTVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = A3BC2F392963D0ED00198261 /* ActivityRecordInfoTVC.swift */; }; - A3BC2F3D296468E500198261 /* UploadedCourseInfoModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A3BC2F3C296468E500198261 /* UploadedCourseInfoModel.swift */; }; A3BC2F3F2964706100198261 /* UploadedCourseInfoCVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = A3BC2F3E2964706100198261 /* UploadedCourseInfoCVC.swift */; }; A3BC2F4129667A0D00198261 /* NicknameEditorVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = A3BC2F4029667A0D00198261 /* NicknameEditorVC.swift */; }; A3BC2F432966A93100198261 /* CourseDetailVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = A3BC2F422966A93100198261 /* CourseDetailVC.swift */; }; @@ -156,9 +154,7 @@ A3BC2F2E2962C40A00198261 /* UploadedCourseInfoVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UploadedCourseInfoVC.swift; sourceTree = ""; }; A3BC2F312962E0DB00198261 /* GoalRewardInfoModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GoalRewardInfoModel.swift; sourceTree = ""; }; A3BC2F33296303A600198261 /* GoalRewardInfoCVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GoalRewardInfoCVC.swift; sourceTree = ""; }; - A3BC2F372963CE3700198261 /* ActivityRecordInfoModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ActivityRecordInfoModel.swift; sourceTree = ""; }; A3BC2F392963D0ED00198261 /* ActivityRecordInfoTVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ActivityRecordInfoTVC.swift; sourceTree = ""; }; - A3BC2F3C296468E500198261 /* UploadedCourseInfoModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UploadedCourseInfoModel.swift; sourceTree = ""; }; A3BC2F3E2964706100198261 /* UploadedCourseInfoCVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UploadedCourseInfoCVC.swift; sourceTree = ""; }; A3BC2F4029667A0D00198261 /* NicknameEditorVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NicknameEditorVC.swift; sourceTree = ""; }; A3BC2F422966A93100198261 /* CourseDetailVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CourseDetailVC.swift; sourceTree = ""; }; @@ -176,7 +172,6 @@ CE10064D29680D2500FD31FB /* .gitkeep */ = {isa = PBXFileReference; lastKnownFileType = text; path = .gitkeep; sourceTree = ""; }; CE10064F29680D3300FD31FB /* .gitkeep */ = {isa = PBXFileReference; lastKnownFileType = text; path = .gitkeep; sourceTree = ""; }; CE10065029680D3800FD31FB /* .gitkeep */ = {isa = PBXFileReference; lastKnownFileType = text; path = .gitkeep; sourceTree = ""; }; - CE10065129680D3F00FD31FB /* .gitkeep */ = {isa = PBXFileReference; lastKnownFileType = text; path = .gitkeep; sourceTree = ""; }; CE10065229680D4400FD31FB /* .gitkeep */ = {isa = PBXFileReference; lastKnownFileType = text; path = .gitkeep; sourceTree = ""; }; CE10065429680F7000FD31FB /* DepartureSearchingResponseDto.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DepartureSearchingResponseDto.swift; sourceTree = ""; }; CE1006562968230800FD31FB /* DepartureLocationModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DepartureLocationModel.swift; sourceTree = ""; }; @@ -284,7 +279,6 @@ CEEC6B3B2961C51A00D00E1E /* CourseStorageVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CourseStorageVC.swift; sourceTree = ""; }; CEEC6B3D2961C53700D00E1E /* CourseDiscoveryVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CourseDiscoveryVC.swift; sourceTree = ""; }; CEEC6B3F2961C55000D00E1E /* MyPageVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MyPageVC.swift; sourceTree = ""; }; - CEEC6B432961C59F00D00E1E /* .gitkeep */ = {isa = PBXFileReference; lastKnownFileType = text; path = .gitkeep; sourceTree = ""; }; CEEC6B442961C5A800D00E1E /* .gitkeep */ = {isa = PBXFileReference; lastKnownFileType = text; path = .gitkeep; sourceTree = ""; }; CEEC6B452961C5B200D00E1E /* .gitkeep */ = {isa = PBXFileReference; lastKnownFileType = text; path = .gitkeep; sourceTree = ""; }; CEEC6B482961C5E200D00E1E /* SplashVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SplashVC.swift; sourceTree = ""; }; @@ -350,7 +344,6 @@ A3BC2F302962E08400198261 /* GoalRewardInfoCollectionView */ = { isa = PBXGroup; children = ( - A3BC2F312962E0DB00198261 /* GoalRewardInfoModel.swift */, A3BC2F33296303A600198261 /* GoalRewardInfoCVC.swift */, ); path = GoalRewardInfoCollectionView; @@ -359,7 +352,6 @@ A3BC2F362963CD2100198261 /* ActivityRecordInfoTableView */ = { isa = PBXGroup; children = ( - A3BC2F372963CE3700198261 /* ActivityRecordInfoModel.swift */, A3BC2F392963D0ED00198261 /* ActivityRecordInfoTVC.swift */, ); path = ActivityRecordInfoTableView; @@ -368,7 +360,6 @@ A3BC2F3B2964671D00198261 /* UploadedCourseInfoCollectionView */ = { isa = PBXGroup; children = ( - A3BC2F3C296468E500198261 /* UploadedCourseInfoModel.swift */, A3BC2F3E2964706100198261 /* UploadedCourseInfoCVC.swift */, ); path = UploadedCourseInfoCollectionView; @@ -481,7 +472,7 @@ CE10064829680CF200FD31FB /* MyPageModel */ = { isa = PBXGroup; children = ( - CE10065129680D3F00FD31FB /* .gitkeep */, + A3BC2F312962E0DB00198261 /* GoalRewardInfoModel.swift */, ); path = MyPageModel; sourceTree = ""; @@ -661,7 +652,6 @@ DAD5A3DB296C6DB800C8166B /* MapCollectionViewCell.swift */, DAD5A3D9296C6DA500C8166B /* TitleCollectionViewCell.swift */, DAD5A3D7296C6D9600C8166B /* AdImageCollectionViewCell.swift */, - CEEC6B432961C59F00D00E1E /* .gitkeep */, CE17F0432961C3D600E1DED0 /* VC */, ); path = Views; @@ -1384,7 +1374,6 @@ A3BC2F432966A93100198261 /* CourseDetailVC.swift in Sources */, DAD5A3D8296C6D9600C8166B /* AdImageCollectionViewCell.swift in Sources */, CE18E890296C76C100FEB569 /* RNLocationModel.swift in Sources */, - A3BC2F3D296468E500198261 /* UploadedCourseInfoModel.swift in Sources */, CE6655DC295D873500C64E12 /* UIButton+.swift in Sources */, CE6655D4295D865B00C64E12 /* Publisher+UIControl.swift in Sources */, CE0D9FD329648DA300CEB5CD /* CustomAlertVC.swift in Sources */, @@ -1430,7 +1419,6 @@ CEC2A68E2962AF2C00160BF7 /* RNMarker.swift in Sources */, CE6655D2295D862A00C64E12 /* Publisher+Driver.swift in Sources */, CE4942AA296FCCFC00736701 /* UploadedCourseDetailRouter.swift in Sources */, - A3BC2F382963CE3700198261 /* ActivityRecordInfoModel.swift in Sources */, CE6655E6295D887F00C64E12 /* UIStackView+.swift in Sources */, A3BC2F34296303A600198261 /* GoalRewardInfoCVC.swift in Sources */, DA97A035296E685C0086760E /* CourseUploadingRouter.swift in Sources */, diff --git a/Runnect-iOS/Runnect-iOS/Global/Literal/ImageLiterals.swift b/Runnect-iOS/Runnect-iOS/Global/Literal/ImageLiterals.swift index 589a6e03..8e418060 100644 --- a/Runnect-iOS/Runnect-iOS/Global/Literal/ImageLiterals.swift +++ b/Runnect-iOS/Runnect-iOS/Global/Literal/ImageLiterals.swift @@ -63,6 +63,7 @@ enum ImageLiterals { static var imgTelescope: UIImage { .load(named: "img_telescope") } static var imgSpaceship: UIImage { .load(named: "img_spaceship") } static var imgAppIcon: UIImage { .load(named: "img_app_icon") } + static var imgAd: UIImage { .load(named: "img_ad") } } extension UIImage { diff --git a/Runnect-iOS/Runnect-iOS/Global/Resource/Assets.xcassets/adimage.imageset/Mask group.png b/Runnect-iOS/Runnect-iOS/Global/Resource/Assets.xcassets/adimage.imageset/Mask group.png deleted file mode 100644 index cc0aa744..00000000 Binary files a/Runnect-iOS/Runnect-iOS/Global/Resource/Assets.xcassets/adimage.imageset/Mask group.png and /dev/null differ diff --git a/Runnect-iOS/Runnect-iOS/Global/Resource/Assets.xcassets/adimage.imageset/Mask group@2x.png b/Runnect-iOS/Runnect-iOS/Global/Resource/Assets.xcassets/adimage.imageset/Mask group@2x.png deleted file mode 100644 index a205d50b..00000000 Binary files a/Runnect-iOS/Runnect-iOS/Global/Resource/Assets.xcassets/adimage.imageset/Mask group@2x.png and /dev/null differ diff --git a/Runnect-iOS/Runnect-iOS/Global/Resource/Assets.xcassets/adimage.imageset/Contents.json b/Runnect-iOS/Runnect-iOS/Global/Resource/Assets.xcassets/img_ad.imageset/Contents.json similarity index 89% rename from Runnect-iOS/Runnect-iOS/Global/Resource/Assets.xcassets/adimage.imageset/Contents.json rename to Runnect-iOS/Runnect-iOS/Global/Resource/Assets.xcassets/img_ad.imageset/Contents.json index 0d69b7d6..70301f16 100644 --- a/Runnect-iOS/Runnect-iOS/Global/Resource/Assets.xcassets/adimage.imageset/Contents.json +++ b/Runnect-iOS/Runnect-iOS/Global/Resource/Assets.xcassets/img_ad.imageset/Contents.json @@ -11,6 +11,7 @@ "scale" : "2x" }, { + "filename" : "Mask group@3x.png", "idiom" : "universal", "scale" : "3x" } diff --git a/Runnect-iOS/Runnect-iOS/Global/Resource/Assets.xcassets/img_ad.imageset/Mask group.png b/Runnect-iOS/Runnect-iOS/Global/Resource/Assets.xcassets/img_ad.imageset/Mask group.png new file mode 100644 index 00000000..cb6c91bb Binary files /dev/null and b/Runnect-iOS/Runnect-iOS/Global/Resource/Assets.xcassets/img_ad.imageset/Mask group.png differ diff --git a/Runnect-iOS/Runnect-iOS/Global/Resource/Assets.xcassets/img_ad.imageset/Mask group@2x.png b/Runnect-iOS/Runnect-iOS/Global/Resource/Assets.xcassets/img_ad.imageset/Mask group@2x.png new file mode 100644 index 00000000..4840b94d Binary files /dev/null and b/Runnect-iOS/Runnect-iOS/Global/Resource/Assets.xcassets/img_ad.imageset/Mask group@2x.png differ diff --git a/Runnect-iOS/Runnect-iOS/Global/Resource/Assets.xcassets/img_ad.imageset/Mask group@3x.png b/Runnect-iOS/Runnect-iOS/Global/Resource/Assets.xcassets/img_ad.imageset/Mask group@3x.png new file mode 100644 index 00000000..25a8d74e Binary files /dev/null and b/Runnect-iOS/Runnect-iOS/Global/Resource/Assets.xcassets/img_ad.imageset/Mask group@3x.png differ diff --git a/Runnect-iOS/Runnect-iOS/Global/UIComponents/MapView/RNMapView.swift b/Runnect-iOS/Runnect-iOS/Global/UIComponents/MapView/RNMapView.swift index 55b44a5c..65d9c0be 100644 --- a/Runnect-iOS/Runnect-iOS/Global/UIComponents/MapView/RNMapView.swift +++ b/Runnect-iOS/Runnect-iOS/Global/UIComponents/MapView/RNMapView.swift @@ -52,23 +52,22 @@ final class RNMapView: UIView { public init() { super.init(frame: .zero) - setUI() - setLayout() - setDelegate() - setMap() - getLocationAuth() - setPathOverlay() + self.mapInit() } override init(frame: CGRect) { super.init(frame: frame) + self.mapInit() + setLocationOverlay() + } + + private func mapInit() { setUI() setLayout() setDelegate() setMap() getLocationAuth() setPathOverlay() - setLocationOverlay() } required init?(coder: NSCoder) { @@ -148,7 +147,6 @@ extension RNMapView { locations[1...].forEach { location in makeMarker(at: location) } - return self } @@ -191,7 +189,6 @@ extension RNMapView { @discardableResult func moveToLocation(location: NMGLatLng) -> Self { let cameraUpdate = NMFCameraUpdate(scrollTo: location) - DispatchQueue.main.async { [self] in cameraUpdate.animation = .easeIn self.map.mapView.moveCamera(cameraUpdate) @@ -304,7 +301,7 @@ extension RNMapView { map.mapView.extent = NMGLatLngBounds(southWestLat: 31.43, southWestLng: 122.37, northEastLat: 44.35, northEastLng: 132) map.showLocationButton = false map.showScaleBar = false - + map.showZoomControls = false map.mapView.logoAlign = .rightTop } diff --git a/Runnect-iOS/Runnect-iOS/Network/Model/MyPageModel/.gitkeep b/Runnect-iOS/Runnect-iOS/Network/Model/MyPageModel/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/Runnect-iOS/Runnect-iOS/Presentation/MyPage/VC/InfoVC/GoalRewardInfoCollectionView/GoalRewardInfoModel.swift b/Runnect-iOS/Runnect-iOS/Network/Model/MyPageModel/GoalRewardInfoModel.swift similarity index 100% rename from Runnect-iOS/Runnect-iOS/Presentation/MyPage/VC/InfoVC/GoalRewardInfoCollectionView/GoalRewardInfoModel.swift rename to Runnect-iOS/Runnect-iOS/Network/Model/MyPageModel/GoalRewardInfoModel.swift diff --git a/Runnect-iOS/Runnect-iOS/Network/Router/CourseDiscoveryRouter/CourseUploadingRouter.swift b/Runnect-iOS/Runnect-iOS/Network/Router/CourseDiscoveryRouter/CourseUploadingRouter.swift index c0a0297b..b6923df1 100644 --- a/Runnect-iOS/Runnect-iOS/Network/Router/CourseDiscoveryRouter/CourseUploadingRouter.swift +++ b/Runnect-iOS/Runnect-iOS/Network/Router/CourseDiscoveryRouter/CourseUploadingRouter.swift @@ -39,7 +39,11 @@ extension CourseUploadingRouter: TargetType { var task: Moya.Task { switch self { case .courseUploadingData(param: let param): - return .requestParameters(parameters: try! param.asParameter(), encoding: JSONEncoding.default) + do { + return .requestParameters(parameters: try param.asParameter(), encoding: JSONEncoding.default) + } catch { + fatalError("Encoding 실패") + } } } diff --git a/Runnect-iOS/Runnect-iOS/Presentation/CourseDiscovery/Views/.gitkeep b/Runnect-iOS/Runnect-iOS/Presentation/CourseDiscovery/Views/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/Runnect-iOS/Runnect-iOS/Presentation/CourseDiscovery/Views/AdImageCollectionViewCell.swift b/Runnect-iOS/Runnect-iOS/Presentation/CourseDiscovery/Views/AdImageCollectionViewCell.swift index ab7ed556..e5aa4670 100644 --- a/Runnect-iOS/Runnect-iOS/Presentation/CourseDiscovery/Views/AdImageCollectionViewCell.swift +++ b/Runnect-iOS/Runnect-iOS/Presentation/CourseDiscovery/Views/AdImageCollectionViewCell.swift @@ -14,7 +14,7 @@ class AdImageCollectionViewCell: UICollectionViewCell { // MARK: - UI Components private let adImageView = UIImageView().then { - $0.image = UIImage(named: "adimage") + $0.image = ImageLiterals.imgAd } // MARK: - Life cycle override init(frame: CGRect) { @@ -34,11 +34,8 @@ extension AdImageCollectionViewCell { func layout() { contentView.backgroundColor = .clear contentView.addSubview(adImageView) - adImageView.snp.makeConstraints { - $0.top.equalToSuperview() - $0.leading.trailing.equalTo(self.contentView.safeAreaLayoutGuide) - $0.height.equalTo(183) + adImageView.snp.makeConstraints { make in + make.edges.equalToSuperview() } - } } diff --git a/Runnect-iOS/Runnect-iOS/Presentation/CourseDiscovery/Views/VC/CourseDiscoveryVC.swift b/Runnect-iOS/Runnect-iOS/Presentation/CourseDiscovery/Views/VC/CourseDiscoveryVC.swift index 5d989eb5..73336bad 100644 --- a/Runnect-iOS/Runnect-iOS/Presentation/CourseDiscovery/Views/VC/CourseDiscoveryVC.swift +++ b/Runnect-iOS/Runnect-iOS/Presentation/CourseDiscovery/Views/VC/CourseDiscoveryVC.swift @@ -283,7 +283,7 @@ extension CourseDiscoveryVC { case .success(let result): let status = result.statusCode if 200..<300 ~= status { - self.getCourseData() + print("스크랩 성공") } if status >= 400 { print("400 error") diff --git a/Runnect-iOS/Runnect-iOS/Presentation/CourseDiscovery/Views/VC/CourseSearchVC.swift b/Runnect-iOS/Runnect-iOS/Presentation/CourseDiscovery/Views/VC/CourseSearchVC.swift index 60c43279..e8aeea67 100644 --- a/Runnect-iOS/Runnect-iOS/Presentation/CourseDiscovery/Views/VC/CourseSearchVC.swift +++ b/Runnect-iOS/Runnect-iOS/Presentation/CourseDiscovery/Views/VC/CourseSearchVC.swift @@ -32,6 +32,7 @@ final class CourseSearchVC: UIViewController { private let dividerView = UIView().then { $0.backgroundColor = .g5 } + private lazy var mapCollectionView: UICollectionView = { let layout = UICollectionViewFlowLayout() layout.scrollDirection = .vertical @@ -103,6 +104,7 @@ extension CourseSearchVC { } private func setData(data: [PublicCourse]) { self.courseList = data + self.emptyDataView.isHidden = !data.isEmpty mapCollectionView.reloadData() } } @@ -130,7 +132,9 @@ extension CourseSearchVC { make.top.equalTo(self.dividerView.snp.bottom) make.leading.trailing.bottom.equalTo(self.view.safeAreaLayoutGuide) } + mapCollectionView.addSubview(emptyDataView) + emptyDataView.snp.makeConstraints { make in make.center.equalToSuperview() } @@ -194,6 +198,7 @@ extension CourseSearchVC: UICollectionViewDelegateFlowLayout { extension CourseSearchVC: CustomNavigationBarDelegate { func searchButtonDidTap(text: String) { + guard !text.isEmpty else { return } searchCourseWithKeyword(keyword: text) self.keyword = text } @@ -224,6 +229,7 @@ extension CourseSearchVC { guard let data = responseDto.data else { return } self.setData(data: data.publicCourses) } catch { + self.setData(data: []) print(error.localizedDescription) } } diff --git a/Runnect-iOS/Runnect-iOS/Presentation/CourseDiscovery/Views/VC/CourseUploadVC.swift b/Runnect-iOS/Runnect-iOS/Presentation/CourseDiscovery/Views/VC/CourseUploadVC.swift index bb26a1d1..b162417d 100644 --- a/Runnect-iOS/Runnect-iOS/Presentation/CourseDiscovery/Views/VC/CourseUploadVC.swift +++ b/Runnect-iOS/Runnect-iOS/Presentation/CourseDiscovery/Views/VC/CourseUploadVC.swift @@ -44,7 +44,7 @@ class CourseUploadVC: UIViewController { $0.backgroundColor = .g5 } private let distanceInfoView = CourseDetailInfoView(title: "거리", description: "0.0km") - private let departureInfoView = CourseDetailInfoView(title: "출발지", description: "패스트파이브 을지로점") + private let departureInfoView = CourseDetailInfoView(title: "출발지", description: "") private let placeholder = "코스에 대한 소개를 적어주세요.(난이도/풍경/지형)" let activityTextView = UITextView().then { @@ -246,28 +246,29 @@ extension CourseUploadVC { mapImageView.snp.makeConstraints { make in make.top.equalToSuperview() make.leading.trailing.equalTo(self.view.safeAreaLayoutGuide) - make.height.equalTo(313) + make.height.equalTo(mapImageView.snp.width).multipliedBy(0.75) } + courseTitleTextField.snp.makeConstraints { make in make.top.equalTo(mapImageView.snp.bottom).offset(28) - make.leading.trailing.equalToSuperview().inset(16) + make.leading.trailing.equalTo(view.safeAreaLayoutGuide).inset(16) make.height.equalTo(35) } - + dividerView.snp.makeConstraints { make in make.top.equalTo(courseTitleTextField.snp.bottom).offset(0) - make.leading.trailing.equalTo(self.view.safeAreaLayoutGuide).inset(16) + make.leading.trailing.equalTo(view.safeAreaLayoutGuide).inset(16) make.height.equalTo(2) } distanceInfoView.snp.makeConstraints { make in make.top.equalTo(courseTitleTextField.snp.bottom).offset(22) - make.leading.trailing.equalToSuperview().inset(16) + make.leading.trailing.equalTo(view.safeAreaLayoutGuide).inset(16) make.height.equalTo(16) } departureInfoView.snp.makeConstraints { make in make.top.equalTo(distanceInfoView.snp.bottom).offset(6) - make.leading.trailing.equalToSuperview().inset(16) + make.leading.trailing.equalTo(view.safeAreaLayoutGuide).inset(16) make.height.equalTo(16) } activityTextView.snp.makeConstraints { make in diff --git a/Runnect-iOS/Runnect-iOS/Presentation/CourseDrawing/VC/CourseDrawingVC.swift b/Runnect-iOS/Runnect-iOS/Presentation/CourseDrawing/VC/CourseDrawingVC.swift index d6d59b29..efc93c0c 100644 --- a/Runnect-iOS/Runnect-iOS/Presentation/CourseDrawing/VC/CourseDrawingVC.swift +++ b/Runnect-iOS/Runnect-iOS/Presentation/CourseDrawing/VC/CourseDrawingVC.swift @@ -120,6 +120,7 @@ extension CourseDrawingVC { func setData(model: DepartureLocationModel) { self.departureLocationModel = model + self.naviBar.setTextFieldText(text: model.departureName) self.mapView.makeStartMarker(at: model.toNMGLatLng(), withCameraMove: true) self.departureLocationLabel.text = model.departureName self.departureDetailLocationLabel.text = model.departureAddress diff --git a/Runnect-iOS/Runnect-iOS/Presentation/MyPage/VC/InfoVC/ActivityRecordInfoTableView/ActivityRecordInfoModel.swift b/Runnect-iOS/Runnect-iOS/Presentation/MyPage/VC/InfoVC/ActivityRecordInfoTableView/ActivityRecordInfoModel.swift deleted file mode 100644 index 4bda198e..00000000 --- a/Runnect-iOS/Runnect-iOS/Presentation/MyPage/VC/InfoVC/ActivityRecordInfoTableView/ActivityRecordInfoModel.swift +++ /dev/null @@ -1,17 +0,0 @@ -// -// ActivityRecordInfoModel.swift -// Runnect-iOS -// -// Created by 몽이 누나 on 2023/01/03. -// - -import Foundation - -struct ActivityRecordInfoModel { - let title: String - let place: String - let date: String - let distance: String - let runningTime: String - let averagePace: String -} diff --git a/Runnect-iOS/Runnect-iOS/Presentation/MyPage/VC/InfoVC/ActivityRecordInfoTableView/ActivityRecordInfoTVC.swift b/Runnect-iOS/Runnect-iOS/Presentation/MyPage/VC/InfoVC/ActivityRecordInfoTableView/ActivityRecordInfoTVC.swift index 6f5a5ca9..7edc5a86 100644 --- a/Runnect-iOS/Runnect-iOS/Presentation/MyPage/VC/InfoVC/ActivityRecordInfoTableView/ActivityRecordInfoTVC.swift +++ b/Runnect-iOS/Runnect-iOS/Presentation/MyPage/VC/InfoVC/ActivityRecordInfoTableView/ActivityRecordInfoTVC.swift @@ -27,6 +27,7 @@ final class ActivityRecordInfoTVC: UITableViewCell { private let activityRecordMapImage = UIImageView().then { $0.layer.cornerRadius = 10 + $0.clipsToBounds = true } private lazy var activityRecordTitleLabel = setBlackTitle() @@ -93,8 +94,6 @@ final class ActivityRecordInfoTVC: UITableViewCell { extension ActivityRecordInfoTVC { func setData(model: ActivityRecord) { - guard let imageURL = URL(string: model.image) else { return } - // 날짜 바꾸기 let activityRecordDate = model.createdAt.prefix(10) let resultDate = RNTimeFormatter.changeDateSplit(date: String(activityRecordDate)) @@ -103,7 +102,6 @@ extension ActivityRecordInfoTVC { let activityRecordRunningTime = model.time.suffix(7) // 평균 페이스 바꾸기 - let activityRecordAveragePace = model.pace let array = spiltActivityRecordAveragePace(model: model) activityRecordTitleLabel.text = model.title @@ -112,7 +110,7 @@ extension ActivityRecordInfoTVC { setUpactivityRecordTotalDistanceValueLabel(model: model, label: activityRecordTotalDistanceValueLabel) activityRecordRunningTimeValueLabel.text = String(activityRecordRunningTime) setUpActivityRecordAveragePaceValueLabel(array: array, label: activityRecordAveragePaceValueLabel) - self.activityRecordMapImage.kf.setImage(with: imageURL) + activityRecordMapImage.setImage(with: model.image) } private func setUpActivityRecordPlaceLabel(model: ActivityRecord, label: UILabel) { diff --git a/Runnect-iOS/Runnect-iOS/Presentation/MyPage/VC/InfoVC/GoalRewardInfoVC.swift b/Runnect-iOS/Runnect-iOS/Presentation/MyPage/VC/InfoVC/GoalRewardInfoVC.swift index ed5bf2b8..029a5f0f 100644 --- a/Runnect-iOS/Runnect-iOS/Presentation/MyPage/VC/InfoVC/GoalRewardInfoVC.swift +++ b/Runnect-iOS/Runnect-iOS/Presentation/MyPage/VC/InfoVC/GoalRewardInfoVC.swift @@ -29,7 +29,7 @@ final class GoalRewardInfoVC: UIViewController { // MARK: - Constants - final let stampInset: UIEdgeInsets = UIEdgeInsets(top: 32, left: 34, bottom: 10, right: 34) + final let stampInset: UIEdgeInsets = UIEdgeInsets(top: 32, left: 34, bottom: 32, right: 34) final let stampLineSpacing: CGFloat = 20 final let stampItemSpacing: CGFloat = 26 final let stampCellHeight: CGFloat = 112 diff --git a/Runnect-iOS/Runnect-iOS/Presentation/MyPage/VC/InfoVC/UploadedCourseInfoCollectionView/UploadedCourseInfoCVC.swift b/Runnect-iOS/Runnect-iOS/Presentation/MyPage/VC/InfoVC/UploadedCourseInfoCollectionView/UploadedCourseInfoCVC.swift index c239483b..4e83bc61 100644 --- a/Runnect-iOS/Runnect-iOS/Presentation/MyPage/VC/InfoVC/UploadedCourseInfoCollectionView/UploadedCourseInfoCVC.swift +++ b/Runnect-iOS/Runnect-iOS/Presentation/MyPage/VC/InfoVC/UploadedCourseInfoCollectionView/UploadedCourseInfoCVC.swift @@ -18,6 +18,7 @@ final class UploadedCourseInfoCVC: UICollectionViewCell { private let uploadedCourseMapImage = UIImageView().then { $0.layer.cornerRadius = 5 + $0.clipsToBounds = true } private let uploadedCourseTitleLabel = UILabel().then { @@ -44,11 +45,9 @@ final class UploadedCourseInfoCVC: UICollectionViewCell { extension UploadedCourseInfoCVC { func setData(model: PublicCourse) { - guard let imageURL = URL(string: model.image) else { return } - + uploadedCourseMapImage.setImage(with: model.image) uploadedCourseTitleLabel.text = model.title setUploadedCoursePlaceLabel(model: model, label: uploadedCoursePlaceLabel) - self.uploadedCourseMapImage.kf.setImage(with: imageURL) } func setUploadedCoursePlaceLabel(model: PublicCourse, label: UILabel) { diff --git a/Runnect-iOS/Runnect-iOS/Presentation/MyPage/VC/InfoVC/UploadedCourseInfoCollectionView/UploadedCourseInfoModel.swift b/Runnect-iOS/Runnect-iOS/Presentation/MyPage/VC/InfoVC/UploadedCourseInfoCollectionView/UploadedCourseInfoModel.swift deleted file mode 100644 index cdb597b7..00000000 --- a/Runnect-iOS/Runnect-iOS/Presentation/MyPage/VC/InfoVC/UploadedCourseInfoCollectionView/UploadedCourseInfoModel.swift +++ /dev/null @@ -1,14 +0,0 @@ -// -// UploadedCourseInfoModel.swift -// Runnect-iOS -// -// Created by 몽이 누나 on 2023/01/03. -// - -import Foundation -import UIKit - -struct UploadedCourseInfoModel { - let title: String - let place: String -}