Skip to content

Commit

Permalink
Merge pull request #25 from We-Are-Techl/design/#17
Browse files Browse the repository at this point in the history
Design/#17 - 온보딩뷰, VC 파일 구성 및 화면 구현 / BaseView & BaseVC BackgroundColor 설정 위치 변경
  • Loading branch information
heydoy authored Jan 27, 2023
2 parents 24068fa + 1227d96 commit 31469f2
Show file tree
Hide file tree
Showing 19 changed files with 454 additions and 8 deletions.
42 changes: 36 additions & 6 deletions Techl-Neo.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@
A2B0DF4C28F30623009F1102 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = A2B0DF4A28F30623009F1102 /* Main.storyboard */; };
A2B0DF4E28F30625009F1102 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = A2B0DF4D28F30625009F1102 /* Assets.xcassets */; };
A2B0DF5128F30626009F1102 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = A2B0DF4F28F30626009F1102 /* LaunchScreen.storyboard */; };
DE81B1552934E0E300530B28 /* OnboardingView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DE81B1542934E0E300530B28 /* OnboardingView.swift */; };
DE81B1572934E0FA00530B28 /* OnboardingVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = DE81B1562934E0FA00530B28 /* OnboardingVC.swift */; };
DE81B1592934F15E00530B28 /* OnboardingCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = DE81B1582934F15E00530B28 /* OnboardingCollectionViewCell.swift */; };
DE81B15B2934F28C00530B28 /* OnboardingMessage.swift in Sources */ = {isa = PBXBuildFile; fileRef = DE81B15A2934F28C00530B28 /* OnboardingMessage.swift */; };
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
Expand All @@ -46,6 +50,10 @@
A4B56B0526AD5311E60C8FEF /* Pods-Techl-Neo.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Techl-Neo.debug.xcconfig"; path = "Target Support Files/Pods-Techl-Neo/Pods-Techl-Neo.debug.xcconfig"; sourceTree = "<group>"; };
C0FFDFC48EC30A82C6C998E2 /* Pods-Techl-Neo.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Techl-Neo.release.xcconfig"; path = "Target Support Files/Pods-Techl-Neo/Pods-Techl-Neo.release.xcconfig"; sourceTree = "<group>"; };
CDB14C8E2D8B25F4975FA683 /* Pods_Techl_Neo.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Techl_Neo.framework; sourceTree = BUILT_PRODUCTS_DIR; };
DE81B1542934E0E300530B28 /* OnboardingView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OnboardingView.swift; sourceTree = "<group>"; };
DE81B1562934E0FA00530B28 /* OnboardingVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OnboardingVC.swift; sourceTree = "<group>"; };
DE81B1582934F15E00530B28 /* OnboardingCollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OnboardingCollectionViewCell.swift; sourceTree = "<group>"; };
DE81B15A2934F28C00530B28 /* OnboardingMessage.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OnboardingMessage.swift; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand Down Expand Up @@ -125,6 +133,7 @@
A26097A928F322E10051BA41 /* Presentations */ = {
isa = PBXGroup;
children = (
DE81B1532934E0AB00530B28 /* Onboarding */,
A2499AAF291E502E00A81D07 /* Base */,
A2B0DF4828F30623009F1102 /* ViewController.swift */,
A2B0DF4A28F30623009F1102 /* Main.storyboard */,
Expand Down Expand Up @@ -179,6 +188,17 @@
path = Pods;
sourceTree = "<group>";
};
DE81B1532934E0AB00530B28 /* Onboarding */ = {
isa = PBXGroup;
children = (
DE81B1542934E0E300530B28 /* OnboardingView.swift */,
DE81B1582934F15E00530B28 /* OnboardingCollectionViewCell.swift */,
DE81B1562934E0FA00530B28 /* OnboardingVC.swift */,
DE81B15A2934F28C00530B28 /* OnboardingMessage.swift */,
);
path = Onboarding;
sourceTree = "<group>";
};
/* End PBXGroup section */

/* Begin PBXNativeTarget section */
Expand Down Expand Up @@ -319,11 +339,15 @@
buildActionMask = 2147483647;
files = (
A2B0DF4928F30623009F1102 /* ViewController.swift in Sources */,
DE81B1572934E0FA00530B28 /* OnboardingVC.swift in Sources */,
A2499AB3291E51D800A81D07 /* BaseVC.swift in Sources */,
A2B0DF4528F30623009F1102 /* AppDelegate.swift in Sources */,
A2499AB1291E504300A81D07 /* BaseView.swift in Sources */,
A2B0DF4728F30623009F1102 /* SceneDelegate.swift in Sources */,
A26097AC28F426EC0051BA41 /* UIColor+Extension.swift in Sources */,
DE81B1552934E0E300530B28 /* OnboardingView.swift in Sources */,
DE81B15B2934F28C00530B28 /* OnboardingMessage.swift in Sources */,
DE81B1592934F15E00530B28 /* OnboardingCollectionViewCell.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -469,10 +493,12 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_IDENTITY = "iPhone Developer";
CODE_SIGN_IDENTITY = "Apple Development";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = F7B353LPM3;
DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = F7B353LPM3;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = "Techl-Neo/Info.plist";
INFOPLIST_KEY_CFBundleDisplayName = "테클";
Expand All @@ -490,7 +516,8 @@
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = com.kimdee.Techl;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = TECHL;
PROVISIONING_PROFILE_SPECIFIER = "";
"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = TECHL;
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = 1;
Expand All @@ -503,10 +530,12 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_IDENTITY = "iPhone Developer";
CODE_SIGN_IDENTITY = "Apple Development";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = F7B353LPM3;
DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = F7B353LPM3;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = "Techl-Neo/Info.plist";
INFOPLIST_KEY_CFBundleDisplayName = "테클";
Expand All @@ -524,7 +553,8 @@
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = com.kimdee.Techl;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = TECHL;
PROVISIONING_PROFILE_SPECIFIER = "";
"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = TECHL;
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = 1;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"images" : [
{
"filename" : "[email protected]",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "[email protected]",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "[email protected]",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"images" : [
{
"filename" : "[email protected]",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "[email protected]",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "[email protected]",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"images" : [
{
"filename" : "[email protected]",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "[email protected]",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "[email protected]",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 0 additions & 1 deletion Techl-Neo/Presentations/Base/BaseVC.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ class BaseVC: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()

self.view.backgroundColor = .systemBackground
configure()
setNavigationBar()

Expand Down
3 changes: 2 additions & 1 deletion Techl-Neo/Presentations/Base/BaseView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ class BaseView: UIView {
/// - VC의 loadView() 메서드를 오버라이딩후 super 메서드를 호출하지 않고 view = 커스텀뷰()로 바꿔주어야 합니다.
override init(frame: CGRect) {
super.init(frame: frame)

backgroundColor = .systemBackground

setupUI()
setConstraints()
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
//
// OnboardingCollectionViewCell.swift
// Techl-Neo
//
// Created by 문정호 on 2022/11/28.
//

import UIKit
import SnapKit
import Then

class OnboardingCollectionViewCell: UICollectionViewCell {

static let identifier = "OnboardingCollectionViewCell"

let thumbnailImageView = UIImageView()
let titleLabel = UILabel().then{
$0.textAlignment = .center
$0.font = UIFont(name: "Apple SD Gothic Neo Bold", size: 28)
}
let descriptionLabel = UILabel().then{
$0.numberOfLines = 2
$0.textAlignment = .center
$0.font = UIFont(name: "Apple SD Gothic Neo SemiBold", size: 22)
}

override init(frame: CGRect) {
super.init(frame: frame)

setUI()
setConstraints()
}

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

func configure(_ message: OnboardingMessage) {
thumbnailImageView.image = UIImage(named: message.imageName)
titleLabel.text = message.title
descriptionLabel.text = message.description
}

func setUI(){
contentView.addSubview(titleLabel)
contentView.addSubview(descriptionLabel)
contentView.addSubview(thumbnailImageView)
}

func setConstraints(){
titleLabel.snp.makeConstraints { make in
make.top.greaterThanOrEqualTo(contentView.snp.top).offset(24)
make.trailing.equalTo(contentView.snp.trailing).offset(-24) // x좌표 기준으로 -24가 되어야 하기 때문에
make.leading.equalTo(contentView.snp.leading).offset(24)

}
descriptionLabel.snp.makeConstraints { make in
make.top.equalTo(titleLabel.snp.bottom).offset(3)
make.trailing.equalTo(titleLabel.snp.trailing)
make.leading.equalTo(titleLabel.snp.leading)
}

thumbnailImageView.snp.makeConstraints{ make in
make.trailing.equalTo(titleLabel.snp.trailing)
make.leading.equalTo(titleLabel.snp.leading)
make.top.equalTo(descriptionLabel.snp.bottom).offset(31)
make.height.equalTo(thumbnailImageView.snp.width).multipliedBy(1/1) //aspect ratio 1:1
}
}
}
22 changes: 22 additions & 0 deletions Techl-Neo/Presentations/Onboarding/OnboardingMessage.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
//
// OnboardingMessage.swift
// Techl-Neo
//
// Created by 문정호 on 2022/11/28.
//

import Foundation

struct OnboardingMessage {
let imageName: String
let title: String
let description: String
}

extension OnboardingMessage {
static let messages: [OnboardingMessage] = [
OnboardingMessage(imageName: "onboarding-1", title: "DISCUSS", description: "기술서적의 후기와 담론을\n포럼에서 자유롭게 할 수 있어요"),
OnboardingMessage(imageName: "onboarding-2", title: "READ TOGETHER", description: "북클럽/챌린지에서\n기술서적을 함께 읽어봐요."),
OnboardingMessage(imageName: "onboarding-3", title: "BOOKMARK", description: "관심있는 서적들을 북마크하여\n새 활동을 모아볼 수 있어요.")
]
}
Loading

0 comments on commit 31469f2

Please sign in to comment.