Skip to content

Commit

Permalink
[Add] #6 - Asset 및 ImageLiterals 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
yeonsu0-0 committed Jan 6, 2024
1 parent 75c8c90 commit ffe8051
Show file tree
Hide file tree
Showing 5 changed files with 73 additions and 0 deletions.
50 changes: 50 additions & 0 deletions DontBe-iOS/DontBe-iOS/Global/Literals/ImageLiterals.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,55 @@
import UIKit

enum ImageLiterals {
enum Common {
static var btnBack: UIImage { .load(name: "btn_back") }
static var logoSymbol: UIImage { .load(name: "logo_symbol") }
}

enum TabMenu {
static var icnHome: UIImage { .load(name: "icn_home") }
static var icnMy: UIImage { .load(name: "icn_my") }
static var icnNotification: UIImage { .load(name: "icn_notification") }
static var icnWrite: UIImage { .load(name: "icn_write") }
}

enum Onboarding {
static var progressbar1: UIImage { .load(name: "onboarding_progressbar_1") }
static var progressbar2: UIImage { .load(name: "onboarding_progressbar_2") }
static var progressbar3: UIImage { .load(name: "onboarding_progressbar_3") }
static var progressbar4: UIImage { .load(name: "onboarding_progressbar_4") }
static var btnNext: UIImage { .load(name: "btn_next") }
static var btnStart: UIImage { .load(name: "btn_start") }
}

enum Login {
static var btnApple: UIImage { .load(name: "login_btn_apple") }
static var btnKakao: UIImage { .load(name: "login_btn_kakao") }
static var btnNaver: UIImage { .load(name: "login_btn_naver") }
}

enum Home {
static var textLogo: UIImage { .load(name: "Logo") }
}

enum Posting {
static var btnComment: UIImage { .load(name: "btn_comment") }
static var btnDelete: UIImage { .load(name: "btn_delete") }
static var btnKebab: UIImage { .load(name: "btn_kebab") }
static var btnWarn: UIImage { .load(name: "btn_warn") }
static var btnFavoriteActive: UIImage { .load(name: "favorite=btn_favorite_active") }
static var btnFavoriteInActive: UIImage { .load(name: "favorite=btn_favorite_default") }
static var icnDelete: UIImage { .load(name: "icn_delete") }
static var btnTransparent: UIImage { .load(name: "status=btn_ghost_default") }
}
}

extension UIImage {
static func load(name: String) -> UIImage {
guard let image = UIImage(named: name, in: nil, compatibleWith: nil) else {
return UIImage()
}
image.accessibilityIdentifier = name
return image
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"images" : [
{
"filename" : "logo_symbol.png",
"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.

0 comments on commit ffe8051

Please sign in to comment.