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

[REFACTOR] #37 - Color Extension 적용 #38

Merged
merged 4 commits into from
Oct 7, 2021
Merged
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
12 changes: 0 additions & 12 deletions NADA-iOS-forRelease.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
F8FC438826C01CDD0033E151 /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8FC438726C01CDD0033E151 /* SceneDelegate.swift */; };
F8FC438F26C01CDE0033E151 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = F8FC438E26C01CDE0033E151 /* Assets.xcassets */; };
F8FC439226C01CDE0033E151 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F8FC439026C01CDE0033E151 /* LaunchScreen.storyboard */; };
F8FC43A926C0207F0033E151 /* TempFont.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8FC43A826C0207F0033E151 /* TempFont.swift */; };
F8FC43AD26C020940033E151 /* TempClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8FC43AC26C020940033E151 /* TempClass.swift */; };
F8FC43AF26C0209A0033E151 /* TempModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8FC43AE26C0209A0033E151 /* TempModel.swift */; };
F8FC43B126C020A70033E151 /* TempNetwork.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8FC43B026C020A70033E151 /* TempNetwork.swift */; };
Expand Down Expand Up @@ -92,7 +91,6 @@
F8FC438E26C01CDE0033E151 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
F8FC439126C01CDE0033E151 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
F8FC439326C01CDE0033E151 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
F8FC43A826C0207F0033E151 /* TempFont.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TempFont.swift; sourceTree = "<group>"; };
F8FC43AC26C020940033E151 /* TempClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TempClass.swift; sourceTree = "<group>"; };
F8FC43AE26C0209A0033E151 /* TempModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TempModel.swift; sourceTree = "<group>"; };
F8FC43B026C020A70033E151 /* TempNetwork.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TempNetwork.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -282,7 +280,6 @@
F857FC8A26C03A5C00A48D01 /* Assets */,
F8FC43A326C01F420033E151 /* Constants */,
F8FC43A426C01F5B0033E151 /* Extensions */,
F8FC43A526C01F630033E151 /* Fonts */,
F8FC43A226C01F2B0033E151 /* Storyboards */,
);
path = Resouces;
Expand Down Expand Up @@ -402,14 +399,6 @@
path = Extensions;
sourceTree = "<group>";
};
F8FC43A526C01F630033E151 /* Fonts */ = {
isa = PBXGroup;
children = (
F8FC43A826C0207F0033E151 /* TempFont.swift */,
);
path = Fonts;
sourceTree = "<group>";
};
/* End PBXGroup section */

/* Begin PBXNativeTarget section */
Expand Down Expand Up @@ -579,7 +568,6 @@
F8FC43BC26C022A20033E151 /* Storyboard.swift in Sources */,
F84BAFAD26FDB543004CA335 /* FrontCardCreationCollectionViewCell.swift in Sources */,
F822E7A92709CEB60020452C /* Notification.swift in Sources */,
F8FC43A926C0207F0033E151 /* TempFont.swift in Sources */,
F8FC438626C01CDD0033E151 /* AppDelegate.swift in Sources */,
F8FC438826C01CDD0033E151 /* SceneDelegate.swift in Sources */,
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ extension UIFont {
}

class var menu: UIFont {
return UIFont(name: "AppleSDGothicNeo-ExtraBold", size: 26.0)!
return UIFont(name: "AppleSDGothicNeo-Bold", size: 26.0)!
}

class var cardName: UIFont {
return UIFont(name: "AppleSDGothicNeo-Bold", size: 24.0)!
}

class var modalName: UIFont {
return UIFont(name: "AppleSDGothicNeo-ExtraBold", size: 22.0)!
return UIFont(name: "AppleSDGothicNeo-Bold", size: 22.0)!
}

class var menuSub: UIFont {
Expand Down Expand Up @@ -91,7 +91,7 @@ extension UIFont {
}

class var login: UIFont {
return UIFont(name: "AppleSDGothicNeo-ExtraBold", size: 14.0)!
return UIFont(name: "AppleSDGothicNeo-Bold", size: 14.0)!
}

class var hint2: UIFont {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ extension UIViewController {

alertViewController.setTitle(font: UIFont.boldSystemFont(ofSize: 17), color: UIColor.white)
alertViewController.setMessage(font: UIFont.systemFont(ofSize: 13), color: UIColor.white)
alertViewController.setTint(color: Colors.mainBlue.color)
alertViewController.setTint(color: .mainBlue)

alertViewController.view.subviews.first?.subviews.first?.subviews.first?.backgroundColor = UIColor(red: 30/255, green: 30/255, blue: 30/255, alpha: 3/4)

Expand Down
8 changes: 0 additions & 8 deletions NADA-iOS-forRelease/Resouces/Fonts/TempFont.swift

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -46,29 +46,29 @@ extension BackCardCreationCollectionViewCell {
private func setUI() {
initUITextFieldList()
scrollView.indicatorStyle = .white
scrollView.backgroundColor = Colors.black.color
bgView.backgroundColor = Colors.black.color
requiredCollectionView.backgroundColor = Colors.step.color
requiredInfoView.backgroundColor = Colors.step.color
optionInfoView.backgroundColor = Colors.step.color
scrollView.backgroundColor = .black1
bgView.backgroundColor = .black1
requiredCollectionView.backgroundColor = .stepBlack5
requiredInfoView.backgroundColor = .stepBlack5
optionInfoView.backgroundColor = .stepBlack5

requiredInfoTextLabel.text = "1 필수 정보"
requiredInfoTextLabel.font = UIFont(name: "AppleSDGothicNeo-Bold", size: 16)
requiredInfoTextLabel.textColor = Colors.white.color
requiredInfoTextLabel.font = .step
requiredInfoTextLabel.textColor = .white1

optionalInfoTextLabel.text = "2 선택 정보"
optionalInfoTextLabel.font = UIFont(name: "AppleSDGothicNeo-Bold", size: 16)
optionalInfoTextLabel.textColor = Colors.white.color
optionalInfoTextLabel.font = .step
optionalInfoTextLabel.textColor = .white1

firstQuestionTextField.attributedPlaceholder = NSAttributedString(string: "질문 1", attributes: [NSAttributedString.Key.foregroundColor: Colors.hint.color])
firstAnswerTextField.attributedPlaceholder = NSAttributedString(string: "대답 1", attributes: [NSAttributedString.Key.foregroundColor: Colors.hint.color])
secondQuestionTextField.attributedPlaceholder = NSAttributedString(string: "질문 2", attributes: [NSAttributedString.Key.foregroundColor: Colors.hint.color])
secondAnswerTextField.attributedPlaceholder = NSAttributedString(string: "대답 2", attributes: [NSAttributedString.Key.foregroundColor: Colors.hint.color])
firstQuestionTextField.attributedPlaceholder = NSAttributedString(string: "질문 1", attributes: [NSAttributedString.Key.foregroundColor: UIColor.hintGray1])
firstAnswerTextField.attributedPlaceholder = NSAttributedString(string: "대답 1", attributes: [NSAttributedString.Key.foregroundColor: UIColor.hintGray1])
secondQuestionTextField.attributedPlaceholder = NSAttributedString(string: "질문 2", attributes: [NSAttributedString.Key.foregroundColor: UIColor.hintGray1])
secondAnswerTextField.attributedPlaceholder = NSAttributedString(string: "대답 2", attributes: [NSAttributedString.Key.foregroundColor: UIColor.hintGray1])

_ = optionalInfoList.map {
$0.font = UIFont(name: "AppleSDGothicNeo-Medium", size: 16)
$0.backgroundColor = Colors.inputBlack.color
$0.textColor = Colors.white.color
$0.font = .hint
$0.backgroundColor = .inputBlack2
$0.textColor = .white1
$0.layer.cornerRadius = 5
}
}
Expand Down Expand Up @@ -142,7 +142,7 @@ extension BackCardCreationCollectionViewCell: UITextFieldDelegate {
func textFieldDidBeginEditing(_ textField: UITextField) {
textField.becomeFirstResponder()
textField.borderWidth = 1
textField.borderColor = Colors.white.color
textField.borderColor = .white1
}
func textFieldDidEndEditing(_ textField: UITextField) {
textField.borderWidth = 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,50 +52,50 @@ class FrontCardCreationCollectionViewCell: UICollectionViewCell {
extension FrontCardCreationCollectionViewCell {
private func setUI() {
initUITextFieldList()
cardBackgroundSettingCollectionView.showsVerticalScrollIndicator = false
cardBackgroundSettingCollectionView.showsHorizontalScrollIndicator = false
scrollView.indicatorStyle = .white
scrollView.backgroundColor = Colors.black.color
bgView.backgroundColor = Colors.black.color
setBackgroundView.backgroundColor = Colors.step.color
requiredInfoView.backgroundColor = Colors.step.color
optionalInfoView.backgroundColor = Colors.step.color
cardBackgroundSettingCollectionView.backgroundColor = Colors.step.color
scrollView.backgroundColor = .black1
bgView.backgroundColor = .black1
setBackgroundView.backgroundColor = .stepBlack5
requiredInfoView.backgroundColor = .stepBlack5
optionalInfoView.backgroundColor = .stepBlack5
cardBackgroundSettingCollectionView.backgroundColor = .stepBlack5

let collectionViewLayout = cardBackgroundSettingCollectionView.collectionViewLayout as? UICollectionViewFlowLayout
collectionViewLayout?.scrollDirection = .horizontal

setBackgroundTextLabel.text = "1 배경 지정"
setBackgroundTextLabel.font = UIFont(name: "AppleSDGothicNeo-Bold", size: 16)
setBackgroundTextLabel.textColor = Colors.white.color
setBackgroundTextLabel.font = .step
setBackgroundTextLabel.textColor = .white1

requiredInfoTextLabel.text = "2 필수 정보"
requiredInfoTextLabel.font = UIFont(name: "AppleSDGothicNeo-Bold", size: 16)
requiredInfoTextLabel.textColor = Colors.white.color
requiredInfoTextLabel.font = .step
requiredInfoTextLabel.textColor = .white1

optionalInfoTextLabel.text = "3 선택 정보"
optionalInfoTextLabel.font = UIFont(name: "AppleSDGothicNeo-Bold", size: 16)
optionalInfoTextLabel.textColor = Colors.white.color
optionalInfoTextLabel.font = .step
optionalInfoTextLabel.textColor = .white1

cardNameTextField.attributedPlaceholder = NSAttributedString(string: "명함이름", attributes: [NSAttributedString.Key.foregroundColor: Colors.hint.color])
userNameTextField.attributedPlaceholder = NSAttributedString(string: "이름", attributes: [NSAttributedString.Key.foregroundColor: Colors.hint.color])
birthTextField.attributedPlaceholder = NSAttributedString(string: "생년월일", attributes: [NSAttributedString.Key.foregroundColor: Colors.hint.color])
mbtiTextField.attributedPlaceholder = NSAttributedString(string: "MBTI", attributes: [NSAttributedString.Key.foregroundColor: Colors.hint.color])
cardNameTextField.attributedPlaceholder = NSAttributedString(string: "명함이름", attributes: [NSAttributedString.Key.foregroundColor: UIColor.hintGray1])
userNameTextField.attributedPlaceholder = NSAttributedString(string: "이름", attributes: [NSAttributedString.Key.foregroundColor: UIColor.hintGray1])
birthTextField.attributedPlaceholder = NSAttributedString(string: "생년월일", attributes: [NSAttributedString.Key.foregroundColor: UIColor.hintGray1])
mbtiTextField.attributedPlaceholder = NSAttributedString(string: "MBTI", attributes: [NSAttributedString.Key.foregroundColor: UIColor.hintGray1])

instagramTextField.attributedPlaceholder = NSAttributedString(string: "Instagram", attributes: [NSAttributedString.Key.foregroundColor: Colors.hint.color])
linkNameTextField.attributedPlaceholder = NSAttributedString(string: "링크 이름", attributes: [NSAttributedString.Key.foregroundColor: Colors.hint.color])
linkURLTextField.attributedPlaceholder = NSAttributedString(string: "링크", attributes: [NSAttributedString.Key.foregroundColor: Colors.hint.color])
clubNameTextField.attributedPlaceholder = NSAttributedString(string: "동아리 기수 / 파트", attributes: [NSAttributedString.Key.foregroundColor: Colors.hint.color])
instagramTextField.attributedPlaceholder = NSAttributedString(string: "Instagram", attributes: [NSAttributedString.Key.foregroundColor: UIColor.hintGray1])
linkNameTextField.attributedPlaceholder = NSAttributedString(string: "링크 이름", attributes: [NSAttributedString.Key.foregroundColor: UIColor.hintGray1])
linkURLTextField.attributedPlaceholder = NSAttributedString(string: "링크", attributes: [NSAttributedString.Key.foregroundColor: UIColor.hintGray1])
clubNameTextField.attributedPlaceholder = NSAttributedString(string: "동아리 기수 / 파트", attributes: [NSAttributedString.Key.foregroundColor: UIColor.hintGray1])

_ = requiredInfoList.map {
$0.font = UIFont(name: "AppleSDGothicNeo-Medium", size: 16)
$0.backgroundColor = Colors.inputBlack.color
$0.textColor = Colors.white.color
$0.font = .hint
$0.backgroundColor = .inputBlack2
$0.textColor = .white1
$0.layer.cornerRadius = 5
}
_ = optionalInfoList.map {
$0.font = UIFont(name: "AppleSDGothicNeo-Medium", size: 16)
$0.backgroundColor = Colors.inputBlack.color
$0.textColor = Colors.white.color
$0.font = .hint
$0.backgroundColor = .inputBlack2
$0.textColor = .white1
$0.layer.cornerRadius = 5
}
}
Expand Down Expand Up @@ -168,7 +168,7 @@ extension FrontCardCreationCollectionViewCell: UITextFieldDelegate {
func textFieldDidBeginEditing(_ textField: UITextField) {
textField.becomeFirstResponder()
textField.borderWidth = 1
textField.borderColor = Colors.white.color
textField.borderColor = .white1
}
func textFieldDidEndEditing(_ textField: UITextField) {
if cardNameTextField.hasText && userNameTextField.hasText && birthTextField.hasText && mbtiTextField.hasText {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ class RequiredFlavorCollectionViewCell: UICollectionViewCell {

extension RequiredFlavorCollectionViewCell {
private func setUI() {
bgView.backgroundColor = Colors.inputBlack.color
bgView.backgroundColor = .inputBlack2
bgView.cornerRadius = 10

flavorLabel.font = UIFont(name: "AppleSDGothicNeo-Medium", size: 16)
flavorLabel.textColor = Colors.hint.color
flavorLabel.font = .hint
flavorLabel.textColor = .hintGray1
}
func initCell(flavor: String) {
flavorLabel.text = flavor
Expand Down
Loading