Skip to content

Commit

Permalink
[Chore] #253 - renamed image assets and applied to presentation layer
Browse files Browse the repository at this point in the history
  • Loading branch information
seongmin221 committed May 5, 2024
1 parent 91fe37b commit a2ea822
Show file tree
Hide file tree
Showing 38 changed files with 170 additions and 244 deletions.
240 changes: 83 additions & 157 deletions GEON-PPANG-iOS/Core/DesignSystem/Source/Assets/UIImage+.swift

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions GEON-PPANG-iOS/Global/Enum/AlertEnum.swift
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ enum AlertType {

var image: UIImage {
switch self {
case .logout: return .Icon.sad
case .leave: return .Icon.sad
case .logout: return .iconSad
case .leave: return .iconSad
}
}
}
8 changes: 4 additions & 4 deletions GEON-PPANG-iOS/Global/Enum/BakeryListEmptyType.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ enum EmptyType: String {

var icon: UIImage {
switch self {
case .noReview, .noMyReview: return .Image.noReview
case .noBookmark: return .Image.noBookmark
case .noSearch: return .Image.noSearchResult
case .initialize: return .Image.search
case .noReview, .noMyReview: return .imgNoReview
case .noBookmark: return .imgNoBookmark
case .noSearch: return .imgNoSearchResult
case .initialize: return .imgSearch
}
}

Expand Down
12 changes: 6 additions & 6 deletions GEON-PPANG-iOS/Global/Enum/TabBarItem.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,22 @@ extension TabBarItemType {
var selectedIcon: UIImage {
switch self {
case .home:
return .Icon.Home.enabled
return .icHomeEnable
case .bakeryList:
return .Icon.StoreList.enabled
return .icStorelistEnable
case .mypage:
return .Icon.Mypage.enabled
return .icMypageEnable
}
}

var unselectedIcon: UIImage {
switch self {
case .home:
return .Icon.Home.disabled
return .icHomeDisable
case .bakeryList:
return .Icon.StoreList.disabled
return .icStorelistDisable
case .mypage:
return .Icon.Mypage.disabled
return .icMypageDisable
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ enum EmojiType {

var icon: UIImage? {
switch self {
case .smile: return .Icon.Smile.px64
case .sad: return .Icon.sad
case .crying: return .Icon.crying
case .smile: return .icSmile
case .sad: return .iconSad
case .crying: return .iconCrying

}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ final class LoginRequiredViewController: BaseViewController {

// MARK: - UI Property

private let loginImageView = UIImageView(image: .Icon.login)
private let loginImageView = UIImageView(image: .icLogin)
private let loginLabel = UILabel()
private let kakaoLoginButton = UIButton()
private let appleLoginButton = UIButton()
Expand Down Expand Up @@ -124,11 +124,11 @@ final class LoginRequiredViewController: BaseViewController {
}

kakaoLoginButton.do {
$0.setImage(.kakaoLoginButton, for: .normal)
$0.setImage(.kakaoSociaLogin, for: .normal)
}

appleLoginButton.do {
$0.setImage(.appleLoginButton, for: .normal)
$0.setImage(.appleSocialLogin, for: .normal)
}

socialLoginButtonStackView.do {
Expand Down
2 changes: 1 addition & 1 deletion GEON-PPANG-iOS/Presentation/Common/Button/BackButton.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ final class BackButton: UIButton {

// MARK: - UI Property

private let leftChevron = UIImageView(image: .Icon.Arrow.left)
private let leftChevron = UIImageView(image: .icArrowLeft)

// MARK: - Init

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ final class BookmarkButton: UIButton {
$0.configurationUpdateHandler = { button in
switch button.state {
case .selected:
button.configuration?.image = .enabledBookmarkButton
button.configuration?.image = .bookmarkButtonEnable
button.configuration?.baseForegroundColor = .gbbPoint1

default:
button.configuration?.image = .disabledBookmarkButton
button.configuration?.image = .bookmarkButtonDisable
button.configuration?.baseForegroundColor = .gbbGray300
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ enum HomeIconType {

var icon: UIImage {
switch self {
case .reviews: return .Icon.Review.px16gray400
case .bookmark: return .Icon.Bookmark.px16gray400
case .region: return .Icon.map
case .reviews: return .icReview16px400
case .bookmark: return .icBookmark16px400
case .region: return .icMap
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ final class BookmarkCountLabel: UILabel {

// MARK: - UI Property

private let imageView = UIImageView(image: .Icon.Bookmark.px16gray400)
private let imageView = UIImageView(image: .icBookmark16px400)
private let label = UILabel()

// MARK: - Life Cycle
Expand Down
2 changes: 1 addition & 1 deletion GEON-PPANG-iOS/Presentation/Common/Label/RegionLabel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ final class RegionLabel: UILabel {

// MARK: - UI Property

private let imageView = UIImageView(image: .Icon.map)
private let imageView = UIImageView(image: .icMap)
private let label = UILabel()

// MARK: - Life Cycle
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ final class IconLabelStackView: UIStackView {
private var ic: UIImage {
switch iconType {
case .bookmark:
return .Icon.Bookmark.px16gray300
return .icBookmark16px300
case .review:
return .Icon.Review.px16
return .icReview16px
case .notice:
return .Icon.notice
return .icNotice18px
case .basic:
return .Icon.swap
return .icSwap
}
}
private var icSize: Int {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ final class MarkStackView: UIStackView {

func configureIconImage(with data: CertificationMarkResponseType) {

haccpMarkIconView.image = data.isHACCP ? .HACCP.mark22 : nil
veganIconView.image = data.isVegan ? .Vegan.mark22 : nil
gmoIconView.image = data.isNonGMO ? .GMO.mark22 : nil
haccpMarkIconView.image = data.isHACCP ? .haccpMark22px : nil
veganIconView.image = data.isVegan ? .veganMark22px : nil
gmoIconView.image = data.isNonGMO ? .gmoMark22px : nil

haccpMarkIconView.isHidden = data.isHACCP ? false : true
veganIconView.isHidden = data.isVegan ? false : true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,11 @@ final class SearchTextField: UITextField {
private func setUI() {

searchButton.do {
$0.setImage(.Icon.Search.gray400, for: .normal)
$0.setImage(.icSearch400, for: .normal)
}

clearButton.do {
$0.setImage(.Icon.delete, for: .normal)
$0.setImage(.icDelete, for: .normal)
$0.addAction(UIAction { _ in
self.text?.removeAll()
}, for: .touchUpInside)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ final class SignInTextField: UITextField {
}

securityButton.do {
$0.setImage(.Icon.hide, for: .normal)
$0.setImage(.Icon.show, for: .selected)
$0.setImage(.icHide, for: .normal)
$0.setImage(.icShow, for: .selected)
$0.addAction(UIAction { [weak self]_ in
self?.isSecureTextEntry.toggle()
self?.securityButton.isSelected.toggle()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ final class DetailBottomView: UIView {
private func setUI() {

bookmarkButton.do {
$0.setImage(.disabledBookmarkButton, for: .normal)
$0.setImage(.bookmarkButtonDisable, for: .normal)
$0.addAction(UIAction { [weak self] _ in
self?.tappedBookmarkButton?()
}, for: .touchUpInside)
Expand Down Expand Up @@ -107,7 +107,7 @@ final class DetailBottomView: UIView {
func configureBookmarkButton(to isSelected: Bool) {

bookmarkButton.do {
$0.setImage((isSelected ? UIImage.enabledBookmarkButton : UIImage.disabledBookmarkButton), for: .normal)
$0.setImage((isSelected ? UIImage.bookmarkButtonEnable : UIImage.bookmarkButtonDisable), for: .normal)
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -96,16 +96,16 @@ final class OnboardingViewController: BaseViewController {
}

logoImage.do {
$0.image = .Icon.launchscreen
$0.image = .icLaunchscreen
$0.contentMode = .scaleAspectFit
}

kakaoLoginButton.do {
$0.setImage(.kakaoLoginButton, for: .normal)
$0.setImage(.kakaoSociaLogin, for: .normal)
}

appleLoginButton.do {
$0.setImage(.appleLoginButton, for: .normal)
$0.setImage(.appleSocialLogin, for: .normal)
}

socialLoginButtonStackView.do {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ final class WelcomeViewController: BaseViewController {
// MARK: - UI Property

private let welcomeLabel = UILabel()
private let welcomeImageView = UIImageView(image: .Image.welcome)
private let welcomeImageView = UIImageView(image: .imgWelcome)

// MARK: - Life Cycle

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ final class InfoCollectionViewCell: UICollectionViewCell {
}

linkImage.do {
$0.image = .Icon.link
$0.image = .icLink
}

linkButtonStackView.do {
Expand All @@ -149,7 +149,7 @@ final class InfoCollectionViewCell: UICollectionViewCell {
}

addressImage.do {
$0.image = .Icon.store
$0.image = .icStore
}

addressLabel.do {
Expand All @@ -163,7 +163,7 @@ final class InfoCollectionViewCell: UICollectionViewCell {
}

openingHoursImage.do {
$0.image = .Icon.time
$0.image = .icTime
}

closedDaysLabel.do {
Expand All @@ -176,7 +176,7 @@ final class InfoCollectionViewCell: UICollectionViewCell {
}

phoneNumberImage.do {
$0.image = .Icon.call
$0.image = .icCall
}

phoneNumberLabel.do {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,10 @@ final class TitleCollectionViewCell: UICollectionViewCell {
func configureCellUI(_ data: BakeryDetailResponseDTO) {

guard let url = URL(string: data.bakeryPicture) else { return }
bakeryImage.kf.setImage(with: url, placeholder: UIImage.Image.Loading.large)
bakeryImage.kf.setImage(with: url, placeholder: UIImage.imgLoadingLarge)
bakeryNameLabel.text = data.bakeryName
markStackView.getMarkStatus(data.isHACCP, data.isVegan, data.isNonGMO)
markStackView.configureIconImage(.HACCP.mark28, .Vegan.mark28, .GMO.mark28)
markStackView.configureIconImage(.haccpMark28px, .veganMark28px, .gmoMark28px)

if !data.isHACCP && !data.isVegan && !data.isNonGMO {
bakeryNameLabel.snp.remakeConstraints {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ final class WrittenReviewsCollectionViewCell: UICollectionViewCell {
}

profileImage.do {
$0.image = .Icon.Smile.px64
$0.image = .icSmile
$0.contentMode = .scaleToFill
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ final class BakeryDetailViewController: BaseViewController {
}

floatingButton.do {
$0.setImage(.Icon.Arrow.up, for: .normal)
$0.setImage(.icArrowUp, for: .normal)
$0.backgroundColor = .gbbWhite
$0.makeBorder(width: 1, color: .gbbGray200)
$0.makeCornerRound(radius: 24)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ final class ReportViewController: BaseViewController {
leading: 8,
bottom: 8,
trailing: 8)
$0.configuration?.image = .Icon.Filter.uncheck
$0.configuration?.image = .icFilterUnchecked
$0.configuration?.imagePadding = 6
$0.configuration?.imagePlacement = .leading
$0.isSelected = false
Expand Down Expand Up @@ -301,10 +301,10 @@ final class ReportViewController: BaseViewController {
nothingSelected()

selectedButton?.isSelected = false // 이전 선택 해제
selectedButton?.configuration?.image = .Icon.Filter.uncheck
selectedButton?.configuration?.image = .icFilterUnchecked

sender.isSelected = true // 새로운 버튼 선택
sender.configuration?.image = .Icon.Filter.check
sender.configuration?.image = .icFilterCheck
sender.configuration?.baseBackgroundColor = .gbbWhite
writeButton.configureInteraction(to: true)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ final class BakeryOverviewView: UIView {
private func setUI() {

bakeryImageView.do {
$0.kf.setImage(with: URL(string: data.imageURL), placeholder: UIImage.Image.Loading.small)
$0.kf.setImage(with: URL(string: data.imageURL), placeholder: UIImage.imgLoadingSmall)
$0.backgroundColor = .gbbPoint1
$0.makeCornerRound(radius: 5)
$0.contentMode = .scaleAspectFill
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ final class WriteReviewBottomSheetView: UIView {

// MARK: - UI Property

private let emojiImageView = UIImageView(image: .Icon.Review.bread)
private let emojiImageView = UIImageView(image: .icReviewBread)
private let sheetTitleLabel = UILabel()
private let sheetDescriptionLabel = UILabel()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ final class BakeryCommonCollectionViewCell: UICollectionViewCell {
}

markStackView.do {
$0.configureIconImage(.HACCP.mark22, .Vegan.mark22, .GMO.mark22)
$0.configureIconImage(.haccpMark22px, .veganMark22px, .gmoMark22px)
}

bakeryTitle.do {
Expand Down Expand Up @@ -136,7 +136,7 @@ final class BakeryCommonCollectionViewCell: UICollectionViewCell {
bookmarkCount.setContentCompressionResistancePriority(UILayoutPriority(751), for: .horizontal)

guard let url = URL(string: data.picture) else { return }
bakeryImage.kf.setImage(with: url, placeholder: UIImage.Image.Loading.small)
bakeryImage.kf.setImage(with: url, placeholder: UIImage.imgLoadingSmall)

regionStackView.configureListUI(text: data.station)
markStackView.getMarkStatus(data.isHACCP, data.isVegan, data.isNonGMO)
Expand All @@ -153,7 +153,7 @@ final class BakeryCommonCollectionViewCell: UICollectionViewCell {
bakeryTitle.lineBreakMode = .byTruncatingTail

guard let url = URL(string: data.picture) else { return }
bakeryImage.kf.setImage(with: url, placeholder: UIImage.Image.Loading.small)
bakeryImage.kf.setImage(with: url, placeholder: UIImage.imgLoadingSmall)

regionStackView.configureListUI(text: data.station)
markStackView.getMarkStatus(data.isHACCP, data.isVegan, data.isNonGMO)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ final class SortBakeryCollectionViewCell: UICollectionViewCell {
// MARK: - UI Property

private let sortByLabel = UILabel()
private let checkImageView = UIImageView(image: .Icon.check)
private let checkImageView = UIImageView(image: .icCheck)

// MARK: - Life Cycle

Expand Down
Loading

0 comments on commit a2ea822

Please sign in to comment.