Skip to content

Commit 71190d2

Browse files
committed
🛠️ :: companyDetailProfileView로 Layout 다시잡기
1 parent 3a90d8b commit 71190d2

File tree

1 file changed

+9
-99
lines changed

1 file changed

+9
-99
lines changed

Projects/Presentation/Sources/CompanyDetail/CompanyDetailViewController.swift

Lines changed: 9 additions & 99 deletions
Original file line numberDiff line numberDiff line change
@@ -8,28 +8,7 @@ import Core
88
import DesignSystem
99

1010
public class CompanyDetailViewController: BaseViewController<CompanyDetailViewModel> {
11-
private let companyLogoImageView = UIImageView().then {
12-
$0.clipsToBounds = true
13-
$0.layer.borderWidth = 1.0
14-
$0.layer.borderColor = UIColor.GrayScale.gray30.cgColor
15-
$0.layer.cornerRadius = 8
16-
}
17-
private let companyLabel = UILabel().then {
18-
$0.setJobisText(
19-
"회사 정보 불러오는 중...",
20-
font: .headLine,
21-
color: .GrayScale.gray90
22-
)
23-
}
24-
private let explainCompanyLabel = UILabel().then {
25-
$0.numberOfLines = 0
26-
$0.lineBreakMode = .byWordWrapping
27-
$0.setJobisText(
28-
"-",
29-
font: .body,
30-
color: .GrayScale.gray70
31-
)
32-
}
11+
private let companyDetailProfileView = CompanyDetailProfileView()
3312
private let scrollView = UIScrollView().then {
3413
$0.showsVerticalScrollIndicator = false
3514
}
@@ -75,9 +54,6 @@ public class CompanyDetailViewController: BaseViewController<CompanyDetailViewMo
7554
scrollView.addSubview(contentView)
7655

7756
[
78-
companyLogoImageView,
79-
companyLabel,
80-
explainCompanyLabel,
8157
bossLabel,
8258
startedDayLabel,
8359
workersNumbersLabel,
@@ -93,31 +69,16 @@ public class CompanyDetailViewController: BaseViewController<CompanyDetailViewMo
9369
].forEach(mainStackView.addArrangedSubview(_:))
9470

9571
[
72+
companyDetailProfileView,
9673
mainStackView,
9774
interviewReviewMenuLabel,
9875
interviewReviewTableView
9976
].forEach(contentView.addSubview(_:))
10077
}
10178

10279
public override func setLayout() {
103-
companyLogoImageView.snp.makeConstraints {
104-
$0.top.equalToSuperview().inset(12)
105-
$0.left.equalToSuperview().inset(24)
106-
$0.width.height.equalTo(48)
107-
}
108-
109-
companyLabel.snp.makeConstraints {
110-
$0.left.equalTo(companyLogoImageView.snp.right).offset(12)
111-
$0.centerY.equalTo(companyLogoImageView)
112-
}
113-
114-
explainCompanyLabel.snp.makeConstraints {
115-
$0.top.equalTo(companyLogoImageView.snp.bottom).offset(8)
116-
$0.left.right.equalToSuperview().inset(24)
117-
}
118-
11980
scrollView.snp.makeConstraints {
120-
$0.top.equalTo(self.view.safeAreaLayoutGuide)
81+
$0.top.equalToSuperview()
12182
$0.leading.trailing.equalTo(self.view.safeAreaLayoutGuide)
12283
$0.bottom.equalTo(recruitmentButton.snp.top).inset(-12)
12384
}
@@ -128,68 +89,17 @@ public class CompanyDetailViewController: BaseViewController<CompanyDetailViewMo
12889
$0.bottom.equalTo(interviewReviewTableView.snp.bottom).offset(20)
12990
}
13091

131-
bossLabel.snp.makeConstraints {
132-
$0.top.equalTo(explainCompanyLabel.snp.bottom).offset(24)
133-
$0.left.right.equalToSuperview().inset(24)
134-
}
135-
136-
startedDayLabel.snp.makeConstraints {
137-
$0.top.equalTo(bossLabel.snp.bottom).offset(16)
138-
$0.left.right.equalToSuperview().inset(24)
139-
}
140-
141-
workersNumbersLabel.snp.makeConstraints {
142-
$0.top.equalTo(startedDayLabel.snp.bottom).offset(16)
143-
$0.left.right.equalToSuperview().inset(24)
144-
}
145-
146-
annualSalesLabel.snp.makeConstraints {
147-
$0.top.equalTo(workersNumbersLabel.snp.bottom).offset(16)
148-
$0.left.right.equalToSuperview().inset(24)
149-
}
150-
151-
headAddressLabel.snp.makeConstraints {
152-
$0.top.equalTo(annualSalesLabel.snp.bottom).offset(16)
153-
$0.left.right.equalToSuperview().inset(24)
154-
}
155-
156-
chainAddressLabel.snp.makeConstraints {
157-
$0.top.equalTo(headAddressLabel.snp.bottom).offset(16)
158-
$0.left.right.equalToSuperview().inset(24)
159-
}
160-
161-
firstManagerLabel.snp.makeConstraints {
162-
$0.top.equalTo(chainAddressLabel.snp.bottom).offset(16)
163-
$0.left.right.equalToSuperview().inset(24)
164-
}
165-
166-
firstPhoneNumberLabel.snp.makeConstraints {
167-
$0.top.equalTo(firstManagerLabel.snp.bottom).offset(16)
168-
$0.left.right.equalToSuperview().inset(24)
169-
}
170-
171-
secondManagerLabel.snp.makeConstraints {
172-
$0.top.equalTo(firstPhoneNumberLabel.snp.bottom).offset(16)
173-
$0.left.right.equalToSuperview().inset(24)
174-
}
175-
176-
secondPhoneNumberLabel.snp.makeConstraints {
177-
$0.top.equalTo(secondManagerLabel.snp.bottom).offset(16)
178-
$0.left.right.equalToSuperview().inset(24)
179-
}
180-
181-
emailLabel.snp.makeConstraints {
182-
$0.top.equalTo(secondPhoneNumberLabel.snp.bottom).offset(16)
183-
$0.left.right.equalToSuperview().inset(24)
92+
companyDetailProfileView.snp.makeConstraints {
93+
$0.top.leading.trailing.equalToSuperview()
18494
}
18595

186-
faxLabel.snp.makeConstraints {
187-
$0.top.equalTo(emailLabel.snp.bottom).offset(16)
188-
$0.left.right.equalToSuperview().inset(24)
96+
mainStackView.snp.makeConstraints {
97+
$0.top.equalTo(companyDetailProfileView.snp.bottom).offset(12)
98+
$0.leading.trailing.equalToSuperview()
18999
}
190100

191101
interviewReviewMenuLabel.snp.makeConstraints {
192-
$0.top.equalTo(faxLabel.snp.bottom).offset(20)
102+
$0.top.equalTo(mainStackView.snp.bottom).offset(20)
193103
}
194104

195105
interviewReviewTableView.snp.makeConstraints {

0 commit comments

Comments
 (0)