Skip to content

Commit

Permalink
[#78] PageList 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
Gyuni committed Sep 14, 2021
1 parent b1f0738 commit 87d3819
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -173,9 +173,15 @@ fileprivate class TypographiesListItemCellDescriptionRow: UIView {
}

private func setupViews() {

setViewHierarchy()
setAutolayout()
}

private func setViewHierarchy() {
self.addSubviews(categoryLabel, propertyLabel)

}

private func setAutolayout() {
self.snp.makeConstraints {
$0.height.equalTo(Dimension.height)
}
Expand All @@ -191,7 +197,6 @@ fileprivate class TypographiesListItemCellDescriptionRow: UIView {
$0.trailing.equalToSuperview()
$0.top.bottom.equalToSuperview()
}

}

}
17 changes: 5 additions & 12 deletions YDS-Storybook/PageListViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class PageListViewController: UIViewController {
// MARK: - tableView에 들어갈 섹션과 셀에 대한 코드입니다.

// 각 섹션의 타이틀로 사용될 문자열입니다.
let sections: [String] = ["0. Rule", "1. Foundation", "2. Atom", "3. Component"]
let sections: [String] = ["1. Foundation", "2. Atom", "3. Component"]


// title은 cell에 표시되는 글자입니다.
Expand All @@ -28,9 +28,6 @@ class PageListViewController: UIViewController {


// 여기 아래에 각 단계에 맞는 Page를 추가해주세요.
let rulePages: [Page] = [
Page(title: "Sample", vc: UIViewController.self),
]

let foundationPages: [Page] = [
Page(title: "Color", vc: ColorsPageViewController.self),
Expand Down Expand Up @@ -126,12 +123,10 @@ extension PageListViewController: UITableViewDataSource {
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
switch(section) {
case 0:
return rulePages.count
case 1:
return foundationPages.count
case 2:
case 1:
return atomPages.count
case 3:
case 2:
return componentPages.count
default:
return 0
Expand All @@ -143,12 +138,10 @@ extension PageListViewController: UITableViewDataSource {

switch(indexPath.section) {
case 0:
page = rulePages[indexPath.row]
case 1:
page = foundationPages[indexPath.row]
case 2:
case 1:
page = atomPages[indexPath.row]
case 3:
case 2:
page = componentPages[indexPath.row]
default:
page = Page(title: "error", vc: UIViewController.self)
Expand Down
6 changes: 3 additions & 3 deletions YDS.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -910,7 +910,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 0.3.2;
MARKETING_VERSION = 0.3.3;
PRODUCT_BUNDLE_IDENTIFIER = "com.yourssu.YDS-Storybook";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = GithubActions_Dist;
Expand Down Expand Up @@ -1109,7 +1109,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 0.3.2;
MARKETING_VERSION = 0.3.3;
PRODUCT_BUNDLE_IDENTIFIER = "com.yourssu.YDS-Storybook";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
Expand All @@ -1130,7 +1130,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 0.3.2;
MARKETING_VERSION = 0.3.3;
PRODUCT_BUNDLE_IDENTIFIER = "com.yourssu.YDS-Storybook";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down

0 comments on commit 87d3819

Please sign in to comment.