diff --git a/On_off_iOS/On_off_iOS.xcodeproj/project.pbxproj b/On_off_iOS/On_off_iOS.xcodeproj/project.pbxproj index 36c6484..886c302 100644 --- a/On_off_iOS/On_off_iOS.xcodeproj/project.pbxproj +++ b/On_off_iOS/On_off_iOS.xcodeproj/project.pbxproj @@ -7,6 +7,8 @@ objects = { /* Begin PBXBuildFile section */ + 355283122B68CB70002BBFFD /* Ext + UIFont.swift in Sources */ = {isa = PBXBuildFile; fileRef = 355283112B68CB70002BBFFD /* Ext + UIFont.swift */; }; + 355283142B68CC94002BBFFD /* Ext + UIColor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 355283132B68CC94002BBFFD /* Ext + UIColor.swift */; }; 3584F3AC2B5A5CC7007ACB57 /* (null) in Sources */ = {isa = PBXBuildFile; }; 3584F3AE2B5A5FEB007ACB57 /* (null) in Sources */ = {isa = PBXBuildFile; }; 35AC0F502B64025300AB0A6B /* TabItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = 35AC0F4F2B64025300AB0A6B /* TabItem.swift */; }; @@ -58,8 +60,19 @@ /* End PBXBuildFile section */ /* Begin PBXFileReference section */ + 355283112B68CB70002BBFFD /* Ext + UIFont.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Ext + UIFont.swift"; sourceTree = ""; }; + 355283132B68CC94002BBFFD /* Ext + UIColor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Ext + UIColor.swift"; sourceTree = ""; }; 35AC0F4F2B64025300AB0A6B /* TabItem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TabItem.swift; sourceTree = ""; }; 35AC0F512B64030400AB0A6B /* TabBarController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TabBarController.swift; sourceTree = ""; }; + 35E0C7292B68C7E3006BF427 /* Pretendard-Bold.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "Pretendard-Bold.otf"; sourceTree = ""; }; + 35E0C72A2B68C7E3006BF427 /* Pretendard-ExtraBold.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "Pretendard-ExtraBold.otf"; sourceTree = ""; }; + 35E0C72B2B68C7E3006BF427 /* Pretendard-ExtraLight.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "Pretendard-ExtraLight.otf"; sourceTree = ""; }; + 35E0C72C2B68C7E3006BF427 /* Pretendard-Black.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "Pretendard-Black.otf"; sourceTree = ""; }; + 35E0C72D2B68C7E3006BF427 /* Pretendard-Light.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "Pretendard-Light.otf"; sourceTree = ""; }; + 35E0C72E2B68C7E3006BF427 /* Pretendard-Regular.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "Pretendard-Regular.otf"; sourceTree = ""; }; + 35E0C72F2B68C7E3006BF427 /* Pretendard-Thin.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "Pretendard-Thin.otf"; sourceTree = ""; }; + 35E0C7302B68C7E3006BF427 /* Pretendard-SemiBold.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "Pretendard-SemiBold.otf"; sourceTree = ""; }; + 35E0C7312B68C7E3006BF427 /* Pretendard-Medium.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "Pretendard-Medium.otf"; sourceTree = ""; }; 374FD49C2B4281E100F2E645 /* OnboardingCustomView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OnboardingCustomView.swift; sourceTree = ""; }; 374FD49E2B42825B00F2E645 /* CustomPageControl.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CustomPageControl.swift; sourceTree = ""; }; 374FD4A12B4294F100F2E645 /* LoginViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginViewController.swift; sourceTree = ""; }; @@ -144,6 +157,22 @@ path = View; sourceTree = ""; }; + 35E0C7282B68C7AC006BF427 /* Fonts */ = { + isa = PBXGroup; + children = ( + 35E0C72C2B68C7E3006BF427 /* Pretendard-Black.otf */, + 35E0C7292B68C7E3006BF427 /* Pretendard-Bold.otf */, + 35E0C72A2B68C7E3006BF427 /* Pretendard-ExtraBold.otf */, + 35E0C72B2B68C7E3006BF427 /* Pretendard-ExtraLight.otf */, + 35E0C72D2B68C7E3006BF427 /* Pretendard-Light.otf */, + 35E0C7312B68C7E3006BF427 /* Pretendard-Medium.otf */, + 35E0C72E2B68C7E3006BF427 /* Pretendard-Regular.otf */, + 35E0C7302B68C7E3006BF427 /* Pretendard-SemiBold.otf */, + 35E0C72F2B68C7E3006BF427 /* Pretendard-Thin.otf */, + ); + path = Fonts; + sourceTree = ""; + }; 374FD49B2B4281CA00F2E645 /* OnBoarding */ = { isa = PBXGroup; children = ( @@ -321,6 +350,8 @@ children = ( 3B0129C52B6242F800B191AD /* Ext + ViewController.swift */, 3B0129C72B6246E900B191AD /* Ext + UIImage.swift */, + 355283112B68CB70002BBFFD /* Ext + UIFont.swift */, + 355283132B68CC94002BBFFD /* Ext + UIColor.swift */, ); path = Extension; sourceTree = ""; @@ -392,6 +423,7 @@ 376A4B552B5504AB004FBB56 /* Assets */, 3B51B5252B63DF8000E5FEF9 /* Constant */, 3B0129C42B6242D400B191AD /* Extension */, + 35E0C7282B68C7AC006BF427 /* Fonts */, 3B4230182B41572400D0B038 /* LaunchScreen.storyboard */, 3B42301B2B41572400D0B038 /* Info.plist */, ); @@ -547,6 +579,8 @@ 3787D00F2B42AD6F00F054DD /* OnBoardingViewModel.swift in Sources */, 374FD4A22B4294F100F2E645 /* LoginViewController.swift in Sources */, 374FD49F2B42825B00F2E645 /* CustomPageControl.swift in Sources */, + 355283122B68CB70002BBFFD /* Ext + UIFont.swift in Sources */, + 355283142B68CC94002BBFFD /* Ext + UIColor.swift in Sources */, 3769A6862B58563000D79C33 /* SelectTimeViewModel.swift in Sources */, 374FD4A42B4297BE00F2E645 /* OnBoardingViewController.swift in Sources */, 3769A6882B58563C00D79C33 /* SelectTimeViewController.swift in Sources */, diff --git a/On_off_iOS/On_off_iOS/Extension/Ext + UIColor.swift b/On_off_iOS/On_off_iOS/Extension/Ext + UIColor.swift new file mode 100644 index 0000000..d726235 --- /dev/null +++ b/On_off_iOS/On_off_iOS/Extension/Ext + UIColor.swift @@ -0,0 +1,49 @@ +// +// Ext + UIColor.swift +// On_off_iOS +// +// Created by 신예진 on 1/30/24. +// + +import Foundation +import UIKit + +extension UIColor { + convenience init(hex: String) { + let scanner = Scanner(string: hex) + _ = scanner.scanString("#") + + var rgb: UInt64 = 0 + scanner.scanHexInt64(&rgb) + + let r = CGFloat((rgb >> 16) & 0xFF) / 255.0 + let g = CGFloat((rgb >> 8) & 0xFF) / 255.0 + let b = CGFloat((rgb >> 0) & 0xFF) / 255.0 + self.init(red: r, green: g, blue: b, alpha: 1.0) + } + + static func colorFromString(_ string: String) -> UIColor { + switch string.uppercased() { + case "YELLOW": + return UIColor.OnOffYellow + case "PURPLE": + return UIColor.OnOffPurple + case "BLACK": + return UIColor.black + case "WHITE": + return UIColor.white + default: + return .clear + } + } +} + +extension UIColor { + static let OnOffMain = UIColor(hex: "7D4BFF") // OnOff 메인컬러 + static let OnOffYellow = UIColor(hex: "#FFD572") //StatisticsView 그래프 컬러 + static let OnOffPurple = UIColor(hex: "#7D4BFF") + static var OnOffLightPurple: UIColor { //날짜 선택 안되었을 때의 컬러 + return OnOffPurple.withAlphaComponent(0.3) + } +} + diff --git a/On_off_iOS/On_off_iOS/Extension/Ext + UIFont.swift b/On_off_iOS/On_off_iOS/Extension/Ext + UIFont.swift new file mode 100644 index 0000000..ab78cbb --- /dev/null +++ b/On_off_iOS/On_off_iOS/Extension/Ext + UIFont.swift @@ -0,0 +1,41 @@ +// +// Ext + Font.swift +// On_off_iOS +// +// Created by 신예진 on 1/30/24. +// + +import Foundation +import UIKit + +extension UIFont { + static func pretendard(size fontSize: CGFloat, weight: UIFont.Weight) -> UIFont { + let familyName = "Pretendard" + + var weightString: String + switch weight { + case .black: + weightString = "Black" + case .bold: + weightString = "Blod" + case .heavy: + weightString = "ExtraBold" + case .ultraLight: + weightString = "ExtraLight" + case .light: + weightString = "Light" + case .medium: + weightString = "Medium" + case .regular: + weightString = "Regular" + case .semibold: + weightString = "SemiBold" + case .thin: + weightString = "Thin" + default: + weightString = "Regular" + } + + return UIFont(name: "\(familyName)-\(weightString)", size: fontSize) ?? .systemFont(ofSize: fontSize, weight: weight) + } +} diff --git a/On_off_iOS/On_off_iOS/Fonts/Pretendard-Black.otf b/On_off_iOS/On_off_iOS/Fonts/Pretendard-Black.otf new file mode 100644 index 0000000..a0d849e Binary files /dev/null and b/On_off_iOS/On_off_iOS/Fonts/Pretendard-Black.otf differ diff --git a/On_off_iOS/On_off_iOS/Fonts/Pretendard-Bold.otf b/On_off_iOS/On_off_iOS/Fonts/Pretendard-Bold.otf new file mode 100644 index 0000000..8e5e30a Binary files /dev/null and b/On_off_iOS/On_off_iOS/Fonts/Pretendard-Bold.otf differ diff --git a/On_off_iOS/On_off_iOS/Fonts/Pretendard-ExtraBold.otf b/On_off_iOS/On_off_iOS/Fonts/Pretendard-ExtraBold.otf new file mode 100644 index 0000000..388f3ca Binary files /dev/null and b/On_off_iOS/On_off_iOS/Fonts/Pretendard-ExtraBold.otf differ diff --git a/On_off_iOS/On_off_iOS/Fonts/Pretendard-ExtraLight.otf b/On_off_iOS/On_off_iOS/Fonts/Pretendard-ExtraLight.otf new file mode 100644 index 0000000..40c8b69 Binary files /dev/null and b/On_off_iOS/On_off_iOS/Fonts/Pretendard-ExtraLight.otf differ diff --git a/On_off_iOS/On_off_iOS/Fonts/Pretendard-Light.otf b/On_off_iOS/On_off_iOS/Fonts/Pretendard-Light.otf new file mode 100644 index 0000000..228679e Binary files /dev/null and b/On_off_iOS/On_off_iOS/Fonts/Pretendard-Light.otf differ diff --git a/On_off_iOS/On_off_iOS/Fonts/Pretendard-Medium.otf b/On_off_iOS/On_off_iOS/Fonts/Pretendard-Medium.otf new file mode 100644 index 0000000..0575069 Binary files /dev/null and b/On_off_iOS/On_off_iOS/Fonts/Pretendard-Medium.otf differ diff --git a/On_off_iOS/On_off_iOS/Fonts/Pretendard-Regular.otf b/On_off_iOS/On_off_iOS/Fonts/Pretendard-Regular.otf new file mode 100644 index 0000000..08bf4cf Binary files /dev/null and b/On_off_iOS/On_off_iOS/Fonts/Pretendard-Regular.otf differ diff --git a/On_off_iOS/On_off_iOS/Fonts/Pretendard-SemiBold.otf b/On_off_iOS/On_off_iOS/Fonts/Pretendard-SemiBold.otf new file mode 100644 index 0000000..e7e36ab Binary files /dev/null and b/On_off_iOS/On_off_iOS/Fonts/Pretendard-SemiBold.otf differ diff --git a/On_off_iOS/On_off_iOS/Fonts/Pretendard-Thin.otf b/On_off_iOS/On_off_iOS/Fonts/Pretendard-Thin.otf new file mode 100644 index 0000000..77e792d Binary files /dev/null and b/On_off_iOS/On_off_iOS/Fonts/Pretendard-Thin.otf differ diff --git a/On_off_iOS/On_off_iOS/Info.plist b/On_off_iOS/On_off_iOS/Info.plist index 0eb786d..54a3c5e 100644 --- a/On_off_iOS/On_off_iOS/Info.plist +++ b/On_off_iOS/On_off_iOS/Info.plist @@ -2,6 +2,18 @@ + UIAppFonts + + Pretendard-Black.otf + Pretendard-Bold.otf + Pretendard-ExtraBold.otf + Pretendard-ExtraLight.otf + Pretendard-Light.otf + Pretendard-Medium.otf + Pretendard-Regular.otf + Pretendard-SemiBold.otf + Pretendard-Thin.otf + UIApplicationSceneManifest UIApplicationSupportsMultipleScenes