Skip to content
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
226 changes: 218 additions & 8 deletions Runnect-iOS/Runnect-iOS.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

60 changes: 60 additions & 0 deletions Runnect-iOS/Runnect-iOS/Global/Literal/ColorLiterals.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
//
// ColorLiterals.swift
// Runnect-iOS
//
// Created by sejin on 2023/01/01.
//

import UIKit

extension UIColor {
static var g1: UIColor {
return UIColor(hex: "#171717")
}

static var g2: UIColor {
return UIColor(hex: "#8B8B8B")
}

static var g3: UIColor {
return UIColor(hex: "#C1C1C1")
}

static var g4: UIColor {
return UIColor(hex: "#ECECEC")
}

static var m1: UIColor {
return UIColor(hex: "#593EEC")
}

static var m2: UIColor {
return UIColor(hex: "#7E71FF")
}

static var m3: UIColor {
return UIColor(hex: "#F2F3FF")
}

static var m4: UIColor {
return UIColor(hex: "#FFFFFF")
}
}

extension UIColor {
convenience init(hex: String, alpha: CGFloat = 1.0) {
var hexFormatted: String = hex.trimmingCharacters(in: CharacterSet.whitespacesAndNewlines).uppercased()

if hexFormatted.hasPrefix("#") {
hexFormatted = String(hexFormatted.dropFirst())
}

assert(hexFormatted.count == 6, "Invalid hex code used.")
var rgbValue: UInt64 = 0
Scanner(string: hexFormatted).scanHexInt64(&rgbValue)

self.init(red: CGFloat((rgbValue & 0xFF0000) >> 16) / 255.0,
green: CGFloat((rgbValue & 0x00FF00) >> 8) / 255.0,
blue: CGFloat(rgbValue & 0x0000FF) / 255.0, alpha: alpha)
}
}
83 changes: 83 additions & 0 deletions Runnect-iOS/Runnect-iOS/Global/Literal/FontLiterals.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
//
// FontLiterals.swift
// Runnect-iOS
//
// Created by sejin on 2023/01/01.
//

import UIKit

extension UIFont {
@nonobjc class var h1: UIFont {
return UIFont.font(.pretendardBold, ofSize: 24)
}

@nonobjc class var h2: UIFont {
return UIFont.font(.pretendardBold, ofSize: 22)
}

@nonobjc class var h2_2: UIFont {
return UIFont.font(.pretendardMedium, ofSize: 22)
}

@nonobjc class var h3: UIFont {
return UIFont.font(.pretendardBold, ofSize: 20)
}

@nonobjc class var h4: UIFont {
return UIFont.font(.pretendardBold, ofSize: 18)
}

@nonobjc class var h5: UIFont {
return UIFont.font(.pretendardSemiBold, ofSize: 15)
}

@nonobjc class var b1: UIFont {
return UIFont.font(.pretendardMedium, ofSize: 17)
}

@nonobjc class var b2: UIFont {
return UIFont.font(.pretendardMedium, ofSize: 15)
}

@nonobjc class var b3: UIFont {
return UIFont.font(.pretendardRegular, ofSize: 15)
}

@nonobjc class var b4: UIFont {
return UIFont.font(.pretendardMedium, ofSize: 14)
}

@nonobjc class var b5: UIFont {
return UIFont.font(.pretendardSemiBold, ofSize: 13)
}

@nonobjc class var b6: UIFont {
return UIFont.font(.pretendardRegular, ofSize: 13)
}

@nonobjc class var b7: UIFont {
return UIFont.font(.pretendardMedium, ofSize: 12)
}

@nonobjc class var b8: UIFont {
return UIFont.font(.pretendardRegular, ofSize: 12)
}

@nonobjc class var b9: UIFont {
return UIFont.font(.pretendardSemiBold, ofSize: 10)
}
}

enum FontName: String {
case pretendardBold = "Pretendard-Bold"
case pretendardSemiBold = "Pretendard-SemiBold"
case pretendardMedium = "Pretendard-Medium"
case pretendardRegular = "Pretendard-Regular"
}

extension UIFont {
static func font(_ style: FontName, ofSize size: CGFloat) -> UIFont {
return UIFont(name: style.rawValue, size: size)!
}
}
74 changes: 74 additions & 0 deletions Runnect-iOS/Runnect-iOS/Global/Literal/ImageLiterals.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
//
// ImageLiterals.swift
// Runnect-iOS
//
// Created by sejin on 2023/01/01.
//

import UIKit

enum ImageLiterals {
// icon
static var icArrowBack: UIImage { .load(named: "ic_arrow_back") }
static var icArrowMaximize: UIImage { .load(named: "ic_arrow_maximize") }
static var icArrowPageback: UIImage { .load(named: "ic_arrow_pageback") }
static var icArrowRight: UIImage { .load(named: "ic_arrow_right") }
static var icCancel: UIImage { .load(named: "ic_cancel") }
static var icCourseDiscoverFill: UIImage { .load(named: "ic_course_discove_fill") }
static var icCourseDiscover: UIImage { .load(named: "ic_course_discover") }
static var icCourseDrawFill: UIImage { .load(named: "ic_course_draw_fill") }
static var icCourseDraw: UIImage { .load(named: "ic_course_draw") }
static var icDistance: UIImage { .load(named: "ic_distance") }
static var icEdit: UIImage { .load(named: "ic_edit") }
static var icHeartFill: UIImage { .load(named: "ic_heart_fill") }
static var icHeart: UIImage { .load(named: "ic_heart") }
static var icMapDeparture: UIImage { .load(named: "ic_map_departure") }
static var icMapLocation: UIImage { .load(named: "ic_map_location") }
static var icMapPoint: UIImage { .load(named: "ic_map_point") }
static var icMapStart: UIImage { .load(named: "ic_map_start") }
static var icMypageFill: UIImage { .load(named: "ic_mypage_fill") }
static var icMypage: UIImage { .load(named: "ic_mypage") }
static var icPlus: UIImage { .load(named: "ic_plus") }
static var icSearch: UIImage { .load(named: "ic_search") }
static var icStar: UIImage { .load(named: "ic_star") }
static var icStar2: UIImage { .load(named: "ic_star2") }
static var icStorageFill: UIImage { .load(named: "ic_storage_fill") }
static var icStorage: UIImage { .load(named: "ic_storage") }
static var icTime: UIImage { .load(named: "ic_time") }
// img
static var imgBackground: UIImage { .load(named: "img_background") }
static var imgLogo: UIImage { .load(named: "img_logo") }
static var imgPaper: UIImage { .load(named: "img_paper") }
static var imgPerson: UIImage { .load(named: "img_person") }
static var imgStampC1: UIImage { .load(named: "img_stamp_c1") }
static var imgStampC2: UIImage { .load(named: "img_stamp_c2") }
static var imgStampC3: UIImage { .load(named: "img_stamp_c3") }
static var imgStampP1: UIImage { .load(named: "img_stamp_p1") }
static var imgStampP2: UIImage { .load(named: "img_stamp_p2") }
static var imgStampP3: UIImage { .load(named: "img_stamp_p3") }
static var imgStampR1: UIImage { .load(named: "img_stamp_r1") }
static var imgStampR2: UIImage { .load(named: "img_stamp_r2") }
static var imgStampR3: UIImage { .load(named: "img_stamp_r3") }
static var imgStampS1: UIImage { .load(named: "img_stamp_s1") }
static var imgStampS2: UIImage { .load(named: "img_stamp_s2") }
static var imgStampS3: UIImage { .load(named: "img_stamp_s3") }
static var imgStamp: UIImage { .load(named: "img_stamp") }
static var imgStorage: UIImage { .load(named: "img_storage") }
}

extension UIImage {
static func load(named imageName: String) -> UIImage {
guard let image = UIImage(named: imageName, in: nil, compatibleWith: nil) else {
return UIImage()
}
image.accessibilityIdentifier = imageName
return image
}

func resize(to size: CGSize) -> UIImage {
let image = UIGraphicsImageRenderer(size: size).image { _ in
draw(in: CGRect(origin: .zero, size: size))
}
return image
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"images" : [
{
"filename" : "btn_arrow_back_white_ios.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "btn_arrow_back_white_ios@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "btn_arrow_back_white_ios@3x.png",
"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" : "btn_arrow maximize.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "btn_arrow maximize@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "btn_arrow maximize@3x.png",
"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" : "btn_arrow_pageback.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "btn_arrow_pageback@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "btn_arrow_pageback@3x.png",
"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" : "btn_arrow_ios.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "btn_arrow_ios@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "btn_arrow_ios@3x.png",
"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" : "btn_back.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "btn_back@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "btn_back@3x.png",
"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,26 @@
{
"images" : [
{
"filename" : "Group 9196-1.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Group 9196@2x-1.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Group 9196@3x-1.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
},
"properties" : {
"template-rendering-intent" : "original"
}
}
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,26 @@
{
"images" : [
{
"filename" : "Group 9196.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Group 9196@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Group 9196@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
},
"properties" : {
"template-rendering-intent" : "original"
}
}
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.
Loading