Skip to content

Commit ff17e8b

Browse files
authored
Merge pull request #258 from thingineeer/#257---내가-그린-코스-순환-참조-문제
[Fix] #257 - 레이아웃 코드를 변경하였습니다.
2 parents 70361d9 + c033220 commit ff17e8b

File tree

57 files changed

+1071
-1002
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+1071
-1002
lines changed

Runnect-iOS/Runnect-iOS.xcodeproj/project.pbxproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@
8787
CE40BB2D296808B00030ABCA /* DepartureSearchingRouter.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE40BB2C296808B00030ABCA /* DepartureSearchingRouter.swift */; };
8888
CE4545C9295D7AF4003201E1 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE4545C8295D7AF4003201E1 /* AppDelegate.swift */; };
8989
CE4545CB295D7AF4003201E1 /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE4545CA295D7AF4003201E1 /* SceneDelegate.swift */; };
90-
CE4545CD295D7AF4003201E1 /* TaBarController.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE4545CC295D7AF4003201E1 /* TaBarController.swift */; };
90+
CE4545CD295D7AF4003201E1 /* TabBarController.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE4545CC295D7AF4003201E1 /* TabBarController.swift */; };
9191
CE4545D2295D7AF5003201E1 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = CE4545D1295D7AF5003201E1 /* Assets.xcassets */; };
9292
CE4545D5295D7AF5003201E1 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = CE4545D3295D7AF5003201E1 /* LaunchScreen.storyboard */; };
9393
CE4942AD296FCD2300736701 /* UploadedCourseDetailResponseDto.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE4942AC296FCD2300736701 /* UploadedCourseDetailResponseDto.swift */; };
@@ -266,7 +266,7 @@
266266
CE4545C5295D7AF4003201E1 /* Runnect-iOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Runnect-iOS.app"; sourceTree = BUILT_PRODUCTS_DIR; };
267267
CE4545C8295D7AF4003201E1 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
268268
CE4545CA295D7AF4003201E1 /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = "<group>"; };
269-
CE4545CC295D7AF4003201E1 /* TaBarController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TaBarController.swift; sourceTree = "<group>"; };
269+
CE4545CC295D7AF4003201E1 /* TabBarController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TabBarController.swift; sourceTree = "<group>"; };
270270
CE4545D1295D7AF5003201E1 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
271271
CE4545D4295D7AF5003201E1 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
272272
CE4545D6295D7AF5003201E1 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
@@ -966,7 +966,7 @@
966966
CE6655AB295D7FBC00C64E12 /* TabBar */ = {
967967
isa = PBXGroup;
968968
children = (
969-
CE4545CC295D7AF4003201E1 /* TaBarController.swift */,
969+
CE4545CC295D7AF4003201E1 /* TabBarController.swift */,
970970
);
971971
path = TabBar;
972972
sourceTree = "<group>";
@@ -1415,7 +1415,7 @@
14151415
CE665602295D918000C64E12 /* JsonCoder.swift in Sources */,
14161416
DA97A033296E65D80086760E /* CourseUploadingRequestDto.swift in Sources */,
14171417
711E18212B38516D00C651CD /* GAManager.swift in Sources */,
1418-
CE4545CD295D7AF4003201E1 /* TaBarController.swift in Sources */,
1418+
CE4545CD295D7AF4003201E1 /* TabBarController.swift in Sources */,
14191419
A3305A97296EF58C000B1A10 /* GoalRewardInfoDto.swift in Sources */,
14201420
CE21C024299E5FE500F62AF5 /* UserRouter.swift in Sources */,
14211421
71F780502B0893D700B53253 /* MarathonMapCollectionViewCell.swift in Sources */,

Runnect-iOS/Runnect-iOS/Global/Extension/UIKit+/UIViewController+.swift

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77

88
import UIKit
99

10+
import SnapKit
11+
1012
extension UIViewController {
1113

1214
/**
@@ -74,9 +76,9 @@ extension UIViewController {
7476

7577
self.view.addSubview(emptyView)
7678

77-
emptyView.snp.makeConstraints { make in
78-
make.center.equalTo(view.safeAreaLayoutGuide)
79-
make.leading.trailing.equalTo(view.safeAreaLayoutGuide).inset(80)
79+
emptyView.snp.makeConstraints {
80+
$0.center.equalTo(view.safeAreaLayoutGuide)
81+
$0.leading.trailing.equalTo(view.safeAreaLayoutGuide).inset(80)
8082
}
8183
}
8284

Runnect-iOS/Runnect-iOS/Global/UIComponents/CourseDetailInfoView.swift

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77

88
import UIKit
99

10+
import SnapKit
11+
import Then
12+
1013
final class CourseDetailInfoView: UIView {
1114

1215
// MARK: - UI Components
@@ -60,20 +63,20 @@ extension CourseDetailInfoView {
6063
private func setLayout() {
6164
self.addSubviews(leftImageView, titleLabel, descriptionLabel)
6265

63-
leftImageView.snp.makeConstraints { make in
64-
make.top.leading.bottom.equalToSuperview()
65-
make.width.equalTo(leftImageView.snp.height)
66+
leftImageView.snp.makeConstraints {
67+
$0.top.leading.bottom.equalToSuperview()
68+
$0.width.equalTo(leftImageView.snp.height)
6669
}
6770

68-
titleLabel.snp.makeConstraints { make in
69-
make.centerY.equalToSuperview()
70-
make.leading.equalTo(leftImageView.snp.trailing).offset(9)
71+
titleLabel.snp.makeConstraints {
72+
$0.centerY.equalToSuperview()
73+
$0.leading.equalTo(leftImageView.snp.trailing).offset(9)
7174
}
7275

73-
descriptionLabel.snp.makeConstraints { make in
74-
make.centerY.equalToSuperview()
75-
make.leading.equalTo(titleLabel.snp.leading).offset(57)
76-
make.trailing.greaterThanOrEqualToSuperview()
76+
descriptionLabel.snp.makeConstraints {
77+
$0.centerY.equalToSuperview()
78+
$0.leading.equalTo(titleLabel.snp.leading).offset(57)
79+
$0.trailing.greaterThanOrEqualToSuperview()
7780
}
7881
}
7982
}

Runnect-iOS/Runnect-iOS/Global/UIComponents/CustomAlertVC.swift

Lines changed: 24 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
import UIKit
99
import Combine
1010

11+
import SnapKit
12+
import Then
13+
1114
final class CustomAlertVC: UIViewController {
1215

1316
// MARK: - Properties
@@ -69,9 +72,9 @@ extension CustomAlertVC {
6972
/// 이미지 변경
7073
public func setImage(_ image: UIImage, size: CGSize) {
7174
self.alertImageView.image = image
72-
self.alertImageView.snp.updateConstraints { make in
73-
make.width.equalTo(size.width)
74-
make.height.equalTo(size.height)
75+
self.alertImageView.snp.updateConstraints {
76+
$0.width.equalTo(size.width)
77+
$0.height.equalTo(size.height)
7578
}
7679
}
7780

@@ -121,28 +124,29 @@ extension CustomAlertVC {
121124

122125
alertView.addSubviews(alertImageView, contentsLabel, buttonStackView)
123126

124-
alertView.snp.makeConstraints { make in
125-
make.center.equalTo(view.safeAreaLayoutGuide)
126-
make.leading.trailing.equalTo(view.safeAreaLayoutGuide).inset(31)
127+
alertView.snp.makeConstraints {
128+
$0.center.equalTo(view.safeAreaLayoutGuide)
129+
$0.leading.trailing.equalTo(view.safeAreaLayoutGuide).inset(31)
127130
}
128131

129-
alertImageView.snp.makeConstraints { make in
130-
make.top.equalToSuperview().inset(38)
131-
make.centerX.equalToSuperview()
132-
make.width.equalTo(189)
133-
make.height.equalTo(169)
132+
alertImageView.snp.makeConstraints {
133+
$0.top.equalToSuperview().inset(38)
134+
$0.centerX.equalToSuperview()
135+
$0.width.equalTo(189)
136+
$0.height.equalTo(169)
134137
}
135138

136-
contentsLabel.snp.makeConstraints { make in
137-
make.top.equalTo(alertImageView.snp.bottom).offset(24)
138-
make.leading.trailing.equalToSuperview().inset(10)
139-
make.centerX.equalToSuperview()
139+
contentsLabel.snp.makeConstraints {
140+
$0.top.equalTo(alertImageView.snp.bottom).offset(24)
141+
$0.leading.trailing.equalToSuperview().inset(10)
142+
$0.centerX.equalToSuperview()
140143
}
141-
buttonStackView.snp.makeConstraints { make in
142-
make.top.equalTo(contentsLabel.snp.bottom).offset(26)
143-
make.leading.trailing.equalToSuperview().inset(14)
144-
make.height.equalTo(44)
145-
make.bottom.equalToSuperview().inset(25)
144+
145+
buttonStackView.snp.makeConstraints {
146+
$0.top.equalTo(contentsLabel.snp.bottom).offset(26)
147+
$0.leading.trailing.equalToSuperview().inset(14)
148+
$0.height.equalTo(44)
149+
$0.bottom.equalToSuperview().inset(25)
146150
}
147151
}
148152
}

Runnect-iOS/Runnect-iOS/Global/UIComponents/CustomBottomSheetVC.swift

Lines changed: 46 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ import UIKit
99
import Combine
1010
import CombineCocoa
1111

12+
import SnapKit
13+
import Then
14+
1215
@frozen
1316
enum SheetType {
1417
case image // 가운에 이미지가 있는 시트
@@ -135,8 +138,9 @@ final class CustomBottomSheetVC: UIViewController {
135138
extension CustomBottomSheetVC {
136139
private func setUI() {
137140
view.addSubview(backgroundView)
138-
backgroundView.snp.makeConstraints { make in
139-
make.edges.equalToSuperview()
141+
142+
backgroundView.snp.makeConstraints {
143+
$0.edges.equalToSuperview()
140144
}
141145
}
142146

@@ -153,27 +157,27 @@ extension CustomBottomSheetVC {
153157
view.addSubviews(bottomSheetView)
154158
bottomSheetView.addSubviews(contentsLabel, mainImageView, completeButton)
155159

156-
bottomSheetView.snp.makeConstraints { make in
157-
make.leading.bottom.trailing.equalToSuperview()
158-
make.height.equalTo(330)
160+
bottomSheetView.snp.makeConstraints {
161+
$0.leading.bottom.trailing.equalToSuperview()
162+
$0.height.equalTo(330)
159163
}
160164

161-
contentsLabel.snp.makeConstraints { make in
162-
make.centerX.equalToSuperview()
163-
make.top.equalToSuperview().inset(30)
165+
contentsLabel.snp.makeConstraints {
166+
$0.centerX.equalToSuperview()
167+
$0.top.equalToSuperview().inset(30)
164168
}
165169

166-
mainImageView.snp.makeConstraints { make in
167-
make.centerX.equalToSuperview()
168-
make.top.equalTo(contentsLabel.snp.bottom).offset(24)
169-
make.width.equalTo(267)
170-
make.height.equalTo(158)
170+
mainImageView.snp.makeConstraints {
171+
$0.centerX.equalToSuperview()
172+
$0.top.equalTo(contentsLabel.snp.bottom).offset(24)
173+
$0.width.equalTo(267)
174+
$0.height.equalTo(158)
171175
}
172176

173-
completeButton.snp.makeConstraints { make in
174-
make.top.equalTo(mainImageView.snp.bottom).offset(20)
175-
make.height.equalTo(44)
176-
make.leading.trailing.equalToSuperview().inset(16)
177+
completeButton.snp.makeConstraints {
178+
$0.top.equalTo(mainImageView.snp.bottom).offset(20)
179+
$0.height.equalTo(44)
180+
$0.leading.trailing.equalToSuperview().inset(16)
177181
}
178182
}
179183

@@ -184,33 +188,33 @@ extension CustomBottomSheetVC {
184188

185189
bottomSheetView.addSubviews(contentsLabel, bottomSheetTextField, dismissIndicatorView, completeButton)
186190

187-
bottomSheetView.snp.makeConstraints { make in
188-
make.leading.bottom.trailing.equalToSuperview()
189-
make.top.equalTo(view.snp.top).offset(topConst)
191+
bottomSheetView.snp.makeConstraints {
192+
$0.leading.bottom.trailing.equalToSuperview()
193+
$0.top.equalTo(view.snp.top).offset(topConst)
190194
}
191195

192-
dismissIndicatorView.snp.makeConstraints { make in
193-
make.width.equalTo(42)
194-
make.height.equalTo(4)
195-
make.top.equalTo(bottomSheetView.snp.top).inset(16)
196-
make.centerX.equalToSuperview()
196+
dismissIndicatorView.snp.makeConstraints {
197+
$0.width.equalTo(42)
198+
$0.height.equalTo(4)
199+
$0.top.equalTo(bottomSheetView.snp.top).inset(16)
200+
$0.centerX.equalToSuperview()
197201
}
198202

199-
contentsLabel.snp.makeConstraints { make in
200-
make.centerX.equalToSuperview()
201-
make.top.equalToSuperview().inset(34)
203+
contentsLabel.snp.makeConstraints {
204+
$0.centerX.equalToSuperview()
205+
$0.top.equalToSuperview().inset(34)
202206
}
203207

204-
bottomSheetTextField.snp.makeConstraints { make in
205-
make.top.equalTo(contentsLabel.snp.bottom).offset(19)
206-
make.leading.trailing.equalToSuperview().inset(16)
207-
make.height.equalTo(44)
208+
bottomSheetTextField.snp.makeConstraints {
209+
$0.top.equalTo(contentsLabel.snp.bottom).offset(19)
210+
$0.leading.trailing.equalToSuperview().inset(16)
211+
$0.height.equalTo(44)
208212
}
209213

210-
completeButton.snp.makeConstraints { make in
211-
make.top.equalTo(bottomSheetTextField.snp.bottom).offset(10)
212-
make.height.equalTo(44)
213-
make.leading.trailing.equalToSuperview().inset(16)
214+
completeButton.snp.makeConstraints {
215+
$0.top.equalTo(bottomSheetTextField.snp.bottom).offset(10)
216+
$0.height.equalTo(44)
217+
$0.leading.trailing.equalToSuperview().inset(16)
214218
}
215219
}
216220

@@ -228,9 +232,9 @@ extension CustomBottomSheetVC {
228232

229233
let topConst = (safeAreaHeight + bottomPadding) - bottomHeight
230234

231-
bottomSheetView.snp.remakeConstraints { make in
232-
make.leading.bottom.trailing.equalToSuperview()
233-
make.top.equalTo(view.snp.top).offset(topConst)
235+
bottomSheetView.snp.remakeConstraints {
236+
$0.leading.bottom.trailing.equalToSuperview()
237+
$0.top.equalTo(view.snp.top).offset(topConst)
234238
}
235239

236240
UIView.animate(withDuration: 0.25, delay: 0, options: .curveEaseIn, animations: {
@@ -287,9 +291,9 @@ extension CustomBottomSheetVC {
287291

288292
let topConst = (safeAreaHeight + bottomPadding)
289293

290-
bottomSheetView.snp.remakeConstraints { make in
291-
make.leading.bottom.trailing.equalToSuperview()
292-
make.top.equalTo(view.snp.top).offset(topConst)
294+
bottomSheetView.snp.remakeConstraints {
295+
$0.leading.bottom.trailing.equalToSuperview()
296+
$0.top.equalTo(view.snp.top).offset(topConst)
293297
}
294298

295299
UIView.animate(withDuration: 0.25, delay: 0, options: .curveEaseIn, animations: {

Runnect-iOS/Runnect-iOS/Global/UIComponents/CustomButton.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import UIKit
1010
public class CustomButton: UIButton {
1111

1212
// MARK: - Initialize
13-
13+
1414
public init(title: String) {
1515
super.init(frame: .zero)
1616
self.setUI(title)

0 commit comments

Comments
 (0)