Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/#12 profile detail UI #33

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 59 additions & 0 deletions SOPKATHON-11-iOS/SOPKATHON-11-iOS.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@
25491B5F2A18FAFE00B16FA8 /* f.swift in Sources */ = {isa = PBXBuildFile; fileRef = 25491B5E2A18FAFE00B16FA8 /* f.swift */; };
25491B612A18FB0800B16FA8 /* g.swift in Sources */ = {isa = PBXBuildFile; fileRef = 25491B602A18FB0800B16FA8 /* g.swift */; };
25491B652A19171B00B16FA8 /* TabBarViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 25491B642A19171B00B16FA8 /* TabBarViewController.swift */; };

A45E93BF2A192FAE0062E313 /* ProfileDetailView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A45E93BE2A192FAE0062E313 /* ProfileDetailView.swift */; };
A45E93C22A1935380062E313 /* ProfileDetail.swift in Sources */ = {isa = PBXBuildFile; fileRef = A45E93C12A1935380062E313 /* ProfileDetail.swift */; };
A45E93C42A1939B40062E313 /* ProfileDetailTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A45E93C32A1939B40062E313 /* ProfileDetailTableViewCell.swift */; };
A45E93C72A1940510062E313 /* ProfileDetailViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A45E93C62A1940510062E313 /* ProfileDetailViewController.swift */; };

25491B752A192F0600B16FA8 /* MatchingListView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 25491B742A192F0600B16FA8 /* MatchingListView.swift */; };
25491B782A192F1800B16FA8 /* MatchingListViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 25491B772A192F1800B16FA8 /* MatchingListViewController.swift */; };
25491B7A2A1930F500B16FA8 /* MatchingListTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 25491B792A1930F500B16FA8 /* MatchingListTableViewCell.swift */; };
Expand All @@ -52,6 +58,7 @@
3E9C06B52A195EB8004624B4 /* Pretendard-Regular.otf in Resources */ = {isa = PBXBuildFile; fileRef = 3E9C06AC2A195EB8004624B4 /* Pretendard-Regular.otf */; };
3E9C06B62A195EB8004624B4 /* Pretendard-ExtraBold.otf in Resources */ = {isa = PBXBuildFile; fileRef = 3E9C06AD2A195EB8004624B4 /* Pretendard-ExtraBold.otf */; };
3E9C06B82A195ED8004624B4 /* UIFont+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3E9C06B72A195ED8004624B4 /* UIFont+Extension.swift */; };

A4D7272B2A190F3D00A00E16 /* NavigationBarView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A4D7272A2A190F3D00A00E16 /* NavigationBarView.swift */; };
A4D7272F2A1916CB00A00E16 /* NavigationBarViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A4D7272E2A1916CB00A00E16 /* NavigationBarViewController.swift */; };
C30F6D372A19179D003A119E /* HomeViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C30F6D362A19179D003A119E /* HomeViewController.swift */; };
Expand Down Expand Up @@ -84,6 +91,12 @@
25491B5E2A18FAFE00B16FA8 /* f.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = f.swift; sourceTree = "<group>"; };
25491B602A18FB0800B16FA8 /* g.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = g.swift; sourceTree = "<group>"; };
25491B642A19171B00B16FA8 /* TabBarViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TabBarViewController.swift; sourceTree = "<group>"; };

A45E93BE2A192FAE0062E313 /* ProfileDetailView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProfileDetailView.swift; sourceTree = "<group>"; };
A45E93C12A1935380062E313 /* ProfileDetail.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProfileDetail.swift; sourceTree = "<group>"; };
A45E93C32A1939B40062E313 /* ProfileDetailTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProfileDetailTableViewCell.swift; sourceTree = "<group>"; };
A45E93C62A1940510062E313 /* ProfileDetailViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProfileDetailViewController.swift; sourceTree = "<group>"; };

25491B742A192F0600B16FA8 /* MatchingListView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MatchingListView.swift; sourceTree = "<group>"; };
25491B772A192F1800B16FA8 /* MatchingListViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MatchingListViewController.swift; sourceTree = "<group>"; };
25491B792A1930F500B16FA8 /* MatchingListTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MatchingListTableViewCell.swift; sourceTree = "<group>"; };
Expand All @@ -109,6 +122,7 @@
3E9C06AC2A195EB8004624B4 /* Pretendard-Regular.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "Pretendard-Regular.otf"; sourceTree = "<group>"; };
3E9C06AD2A195EB8004624B4 /* Pretendard-ExtraBold.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "Pretendard-ExtraBold.otf"; sourceTree = "<group>"; };
3E9C06B72A195ED8004624B4 /* UIFont+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIFont+Extension.swift"; sourceTree = "<group>"; };

A4D7272A2A190F3D00A00E16 /* NavigationBarView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NavigationBarView.swift; sourceTree = "<group>"; };
A4D7272E2A1916CB00A00E16 /* NavigationBarViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NavigationBarViewController.swift; sourceTree = "<group>"; };
C30F6D362A19179D003A119E /* HomeViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomeViewController.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -156,6 +170,7 @@
251DD5722A1520C6005951B8 /* SOPKATHON-11-iOS */ = {
isa = PBXGroup;
children = (
A45E93C02A1935290062E313 /* Data */,
251DD58A2A15213D005951B8 /* Application */,
251DD5892A15213A005951B8 /* Network */,
251DD5872A152122005951B8 /* Global */,
Expand Down Expand Up @@ -211,7 +226,10 @@
251DD58C2A1521F5005951B8 /* ViewController */ = {
isa = PBXGroup;
children = (
A45E93C52A1940390062E313 /* ProfileDetail */,

3E9C067F2A190B78004624B4 /* InputData */,

A4D727302A19173500A00E16 /* NavigationBar */,
25491B6B2A1920E700B16FA8 /* MatchingList */,
25491B6A2A19177600B16FA8 /* TabBar */,
Expand All @@ -224,11 +242,16 @@
251DD58D2A1521FA005951B8 /* View */ = {
isa = PBXGroup;
children = (

A45E93BD2A192F970062E313 /* ProfileDetail */,
A4D727292A190C0500A00E16 /* NavigationBar */,

25491B732A192EFC00B16FA8 /* MatchingList */,
3E9C06802A190B86004624B4 /* InputData */,
A4D727292A190C0500A00E16 /* NavigationBar */,
C30F6D3F2A1939DF003A119E /* Matching */,
C30F6D3B2A191A8B003A119E /* Home */,

);
path = View;
sourceTree = "<group>";
Expand Down Expand Up @@ -350,6 +373,31 @@
path = MatchingList;
sourceTree = "<group>";
};

A45E93BD2A192F970062E313 /* ProfileDetail */ = {
isa = PBXGroup;
children = (
A45E93BE2A192FAE0062E313 /* ProfileDetailView.swift */,
A45E93C32A1939B40062E313 /* ProfileDetailTableViewCell.swift */,
);
path = ProfileDetail;
sourceTree = "<group>";
};
A45E93C02A1935290062E313 /* Data */ = {
isa = PBXGroup;
children = (
A45E93C12A1935380062E313 /* ProfileDetail.swift */,
);
path = Data;
sourceTree = "<group>";
};
A45E93C52A1940390062E313 /* ProfileDetail */ = {
isa = PBXGroup;
children = (
A45E93C62A1940510062E313 /* ProfileDetailViewController.swift */,
);
path = ProfileDetail;

25491B732A192EFC00B16FA8 /* MatchingList */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -395,6 +443,7 @@
3E9C06832A190BD3004624B4 /* ButtonSetView.swift */,
);
path = Component;

sourceTree = "<group>";
};
A4D727292A190C0500A00E16 /* NavigationBar */ = {
Expand Down Expand Up @@ -537,15 +586,24 @@
buildActionMask = 2147483647;
files = (
251DD5A22A152393005951B8 /* UIViewController+Extension.swift in Sources */,

251DD5782A1520C6005951B8 /* ViewController.swift in Sources */,
A45E93BF2A192FAE0062E313 /* ProfileDetailView.swift in Sources */,
A45E93C42A1939B40062E313 /* ProfileDetailTableViewCell.swift in Sources */,
A45E93C72A1940510062E313 /* ProfileDetailViewController.swift in Sources */,

3E9C067E2A190B38004624B4 /* FirstInputDataViewController.swift in Sources */,
C30F6D372A19179D003A119E /* HomeViewController.swift in Sources */,

251DD5A62A15249C005951B8 /* UILabel+Extension.swift in Sources */,
25491B7C2A19376700B16FA8 /* MatchingListViewData.swift in Sources */,
A4D7272F2A1916CB00A00E16 /* NavigationBarViewController.swift in Sources */,
251DD5AA2A1525EC005951B8 /* UIImageView+Extention.swift in Sources */,
25491B612A18FB0800B16FA8 /* g.swift in Sources */,

3E9C06902A1935B0004624B4 /* SecondInputDataViewController.swift in Sources */,
C30F6D3D2A193662003A119E /* MatchingViewController.swift in Sources */,

251DD5742A1520C6005951B8 /* AppDelegate.swift in Sources */,
25491B752A192F0600B16FA8 /* MatchingListView.swift in Sources */,
3E9C06A22A195B1D004624B4 /* ImageLiteral.swift in Sources */,
Expand Down Expand Up @@ -575,6 +633,7 @@
3E9C06A42A195DD9004624B4 /* UIColor+Extension.swift in Sources */,
3E9C06882A191378004624B4 /* BasicCell.swift in Sources */,
251DD5A42A1523C3005951B8 /* UIView+Extension .swift in Sources */,
A45E93C22A1935380062E313 /* ProfileDetail.swift in Sources */,
251DD5A82A1525AD005951B8 /* NetworkResult.swift in Sources */,
3E9C06922A193942004624B4 /* TextfieldWithLabelView.swift in Sources */,
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate {
func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {

guard let windowScene = (scene as? UIWindowScene) else { return }
let navigationController = UINavigationController(rootViewController: TabBarViewController())
let navigationController = UINavigationController(rootViewController: ProfileDetailViewController())
self.window = UIWindow(windowScene: windowScene)


Expand Down
27 changes: 27 additions & 0 deletions SOPKATHON-11-iOS/SOPKATHON-11-iOS/Data/ProfileDetail.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
//
// ProfileDetail.swift
// SOPKATHON-11-iOS
//
// Created by 고아라 on 2023/05/21.
//

import UIKit

struct ProfileDetail {
let name: String
//let profileImage: String
let age: Int
let local: String
let isMarried: Bool
let hasChild: Bool
let hobby: [String]
let keyword: [String]
}

extension ProfileDetail {
static func profileDummy() -> [ProfileDetail] {
return [
ProfileDetail(name: "고아라", age: 2001, local: "서울", isMarried: true, hasChild: true, hobby: ["스쿼시"], keyword: ["매력적인"])
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
//
// ProfileDetailTableViewCell.swift
// SOPKATHON-11-iOS
//
// Created by 고아라 on 2023/05/21.
//

import UIKit

import SnapKit
import Then

class ProfileDetailTableViewCell: UITableViewCell {

static let identifier = "ProfileDetailTableViewCell"

let profileDetailTitle = UILabel()
lazy var profileDetailText = UILabel()
let profileDetailLine = UIView()

override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)

// MARK: - 컴포넌트 설정
setUI()

// MARK: - addsubView
setHierarchy()

// MARK: - autolayout설정
setLayout()

}

required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}

}

extension ProfileDetailTableViewCell {
func setUI() {
profileDetailTitle.do {
$0.text = "지역"
$0.font = .systemFont(ofSize: 16)
}

profileDetailText.do {
$0.font = .systemFont(ofSize: 17)
$0.textColor = UIColor.gray
}

profileDetailLine.do {
$0.backgroundColor = UIColor.gray
}
}

func setHierarchy() {
contentView.addSubviews(profileDetailTitle, profileDetailText, profileDetailLine)
}

func setLayout() {
profileDetailTitle.snp.makeConstraints {
$0.top.equalToSuperview()
$0.leading.equalTo(46)
}

profileDetailText.snp.makeConstraints {
$0.top.equalTo(profileDetailTitle.snp.bottom).offset(13)
$0.leading.equalTo(46)
}
profileDetailLine.snp.makeConstraints {
$0.top.equalTo(profileDetailTitle.snp.bottom).inset(2)
$0.width.equalTo(297)
}
}

}
Loading