Skip to content

Commit

Permalink
Merge pull request #1321 from wakmusic/apply-multi-special-icons
Browse files Browse the repository at this point in the history
πŸ”€ :: (#1320) 기간에 λ§žλŠ” μ•± μ•„μ΄μ½˜ μžλ™ λ³€κ²½
  • Loading branch information
yongbeomkwak authored Oct 26, 2024
2 parents 32265c4 + 0219f3a commit ec678d7
Show file tree
Hide file tree
Showing 7 changed files with 54 additions and 10 deletions.
5 changes: 4 additions & 1 deletion Projects/App/Project.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,12 @@ import Foundation
import ProjectDescription
import ProjectDescriptionHelpers

let alternativeAppIconNames: [String] = ["HalloweenAppIcon", " XmasAppIcon"]

let settinges: Settings =
.settings(
base: env.baseSetting,
base: env.baseSetting
.merging(["ASSETCATALOG_COMPILER_ALTERNATE_APPICON_NAMES": .array(alternativeAppIconNames)]),
configurations: [
.debug(name: .debug),
.debug(name: .qa),
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"images" : [
{
"filename" : "HalloweenAppIcon.png",
"idiom" : "universal",
"platform" : "ios",
"size" : "1024x1024"
}
],
"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.
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"images" : [
{
"filename" : "XmasAppIcon.png",
"idiom" : "universal",
"platform" : "ios",
"size" : "1024x1024"
}
],
"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.
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,8 @@ private extension IntroViewController {
} else {
logoType = .usual
}

changeAppIcon(logoType)
self.view.backgroundColor = logoType == .halloween ? colorFromRGB(0x191A1C) : .white

let animationView = LottieAnimationView(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,26 @@
//
// SplashLogoType.swift
// RootFeature
//
// Created by KTH on 10/22/24.
// Copyright Β© 2024 yongbeomkwak. All rights reserved.
//

import Foundation
import UIKit

enum SplashLogoType: String {
case usual = "Splash_Logo_Main"
case halloween = "Splash_Logo_Halloween"
case xmas = "Splash_Logo_Xmas"

var icon: String? {
switch self {
case .usual:
return nil
case .halloween:
return "HalloweenAppIcon"
case .xmas:
return "XmasAppIcon"
}
}
}

func changeAppIcon(_ type: SplashLogoType) {
guard UIApplication.shared.alternateIconName != type.icon else {
return
}

UIApplication.shared.setAlternateIconName(type.icon)
}

0 comments on commit ec678d7

Please sign in to comment.