Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into feat/#15-on-view
Browse files Browse the repository at this point in the history
  • Loading branch information
yeahzxnn committed Jan 31, 2024
2 parents f8b401f + cad1115 commit 49e3321
Show file tree
Hide file tree
Showing 13 changed files with 136 additions and 0 deletions.
34 changes: 34 additions & 0 deletions On_off_iOS/On_off_iOS.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -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 */; };
Expand Down Expand Up @@ -58,8 +60,19 @@
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
355283112B68CB70002BBFFD /* Ext + UIFont.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Ext + UIFont.swift"; sourceTree = "<group>"; };
355283132B68CC94002BBFFD /* Ext + UIColor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Ext + UIColor.swift"; sourceTree = "<group>"; };
35AC0F4F2B64025300AB0A6B /* TabItem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TabItem.swift; sourceTree = "<group>"; };
35AC0F512B64030400AB0A6B /* TabBarController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TabBarController.swift; sourceTree = "<group>"; };
35E0C7292B68C7E3006BF427 /* Pretendard-Bold.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "Pretendard-Bold.otf"; sourceTree = "<group>"; };
35E0C72A2B68C7E3006BF427 /* Pretendard-ExtraBold.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "Pretendard-ExtraBold.otf"; sourceTree = "<group>"; };
35E0C72B2B68C7E3006BF427 /* Pretendard-ExtraLight.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "Pretendard-ExtraLight.otf"; sourceTree = "<group>"; };
35E0C72C2B68C7E3006BF427 /* Pretendard-Black.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "Pretendard-Black.otf"; sourceTree = "<group>"; };
35E0C72D2B68C7E3006BF427 /* Pretendard-Light.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "Pretendard-Light.otf"; sourceTree = "<group>"; };
35E0C72E2B68C7E3006BF427 /* Pretendard-Regular.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "Pretendard-Regular.otf"; sourceTree = "<group>"; };
35E0C72F2B68C7E3006BF427 /* Pretendard-Thin.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "Pretendard-Thin.otf"; sourceTree = "<group>"; };
35E0C7302B68C7E3006BF427 /* Pretendard-SemiBold.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "Pretendard-SemiBold.otf"; sourceTree = "<group>"; };
35E0C7312B68C7E3006BF427 /* Pretendard-Medium.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "Pretendard-Medium.otf"; sourceTree = "<group>"; };
374FD49C2B4281E100F2E645 /* OnboardingCustomView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OnboardingCustomView.swift; sourceTree = "<group>"; };
374FD49E2B42825B00F2E645 /* CustomPageControl.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CustomPageControl.swift; sourceTree = "<group>"; };
374FD4A12B4294F100F2E645 /* LoginViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginViewController.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -144,6 +157,22 @@
path = View;
sourceTree = "<group>";
};
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 = "<group>";
};
374FD49B2B4281CA00F2E645 /* OnBoarding */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -321,6 +350,8 @@
children = (
3B0129C52B6242F800B191AD /* Ext + ViewController.swift */,
3B0129C72B6246E900B191AD /* Ext + UIImage.swift */,
355283112B68CB70002BBFFD /* Ext + UIFont.swift */,
355283132B68CC94002BBFFD /* Ext + UIColor.swift */,
);
path = Extension;
sourceTree = "<group>";
Expand Down Expand Up @@ -392,6 +423,7 @@
376A4B552B5504AB004FBB56 /* Assets */,
3B51B5252B63DF8000E5FEF9 /* Constant */,
3B0129C42B6242D400B191AD /* Extension */,
35E0C7282B68C7AC006BF427 /* Fonts */,
3B4230182B41572400D0B038 /* LaunchScreen.storyboard */,
3B42301B2B41572400D0B038 /* Info.plist */,
);
Expand Down Expand Up @@ -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 */,
Expand Down
49 changes: 49 additions & 0 deletions On_off_iOS/On_off_iOS/Extension/Ext + UIColor.swift
Original file line number Diff line number Diff line change
@@ -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)
}
}

41 changes: 41 additions & 0 deletions On_off_iOS/On_off_iOS/Extension/Ext + UIFont.swift
Original file line number Diff line number Diff line change
@@ -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)
}
}
Binary file added On_off_iOS/On_off_iOS/Fonts/Pretendard-Black.otf
Binary file not shown.
Binary file added On_off_iOS/On_off_iOS/Fonts/Pretendard-Bold.otf
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added On_off_iOS/On_off_iOS/Fonts/Pretendard-Light.otf
Binary file not shown.
Binary file added On_off_iOS/On_off_iOS/Fonts/Pretendard-Medium.otf
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added On_off_iOS/On_off_iOS/Fonts/Pretendard-Thin.otf
Binary file not shown.
12 changes: 12 additions & 0 deletions On_off_iOS/On_off_iOS/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,18 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>UIAppFonts</key>
<array>
<string>Pretendard-Black.otf</string>
<string>Pretendard-Bold.otf</string>
<string>Pretendard-ExtraBold.otf</string>
<string>Pretendard-ExtraLight.otf</string>
<string>Pretendard-Light.otf</string>
<string>Pretendard-Medium.otf</string>
<string>Pretendard-Regular.otf</string>
<string>Pretendard-SemiBold.otf</string>
<string>Pretendard-Thin.otf</string>
</array>
<key>UIApplicationSceneManifest</key>
<dict>
<key>UIApplicationSupportsMultipleScenes</key>
Expand Down

0 comments on commit 49e3321

Please sign in to comment.