Skip to content

Commit

Permalink
Merge pull request TeamSparker#428 from hyun99999/feature/TeamSparker…
Browse files Browse the repository at this point in the history
…#417

[Design] TeamSparker#417 - 홈 성공/실패 팝업 로티 추가
  • Loading branch information
hyun99999 authored Mar 24, 2022
2 parents 5b45d25 + dbf6e21 commit 8654366
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 7 deletions.
8 changes: 8 additions & 0 deletions Spark-iOS/Spark-iOS.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,8 @@
F80A3E53278C1C0C00728E07 /* Storage.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F80A3E52278C1C0C00728E07 /* Storage.storyboard */; };
F80A3E55278C1C1F00728E07 /* StorageVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = F80A3E54278C1C1F00728E07 /* StorageVC.swift */; };
F80A3E57278C1C2700728E07 /* FeedVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = F80A3E56278C1C2700728E07 /* FeedVC.swift */; };
F80B02CF27EC1BD800D63B45 /* homeCardFail.json in Resources */ = {isa = PBXBuildFile; fileRef = F80B02CE27EC1BD800D63B45 /* homeCardFail.json */; };
F80B02D127EC1BDC00D63B45 /* homeCardSuccess.json in Resources */ = {isa = PBXBuildFile; fileRef = F80B02D027EC1BDC00D63B45 /* homeCardSuccess.json */; };
F816F122278E1C760008ED00 /* Login.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F816F121278E1C760008ED00 /* Login.storyboard */; };
F816F125278E1C920008ED00 /* LoginVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = F816F124278E1C920008ED00 /* LoginVC.swift */; };
F821812E27DE224A00DDFBF8 /* SparkTabBar.swift in Sources */ = {isa = PBXBuildFile; fileRef = F821812D27DE224A00DDFBF8 /* SparkTabBar.swift */; };
Expand Down Expand Up @@ -367,6 +369,8 @@
F80A3E52278C1C0C00728E07 /* Storage.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = Storage.storyboard; sourceTree = "<group>"; };
F80A3E54278C1C1F00728E07 /* StorageVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StorageVC.swift; sourceTree = "<group>"; };
F80A3E56278C1C2700728E07 /* FeedVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FeedVC.swift; sourceTree = "<group>"; };
F80B02CE27EC1BD800D63B45 /* homeCardFail.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = homeCardFail.json; sourceTree = "<group>"; };
F80B02D027EC1BDC00D63B45 /* homeCardSuccess.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = homeCardSuccess.json; sourceTree = "<group>"; };
F816F121278E1C760008ED00 /* Login.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = Login.storyboard; sourceTree = "<group>"; };
F816F124278E1C920008ED00 /* LoginVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginVC.swift; sourceTree = "<group>"; };
F821812D27DE224A00DDFBF8 /* SparkTabBar.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SparkTabBar.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -885,6 +889,8 @@
EBEA3819279441BD00B5736A /* Lottie */ = {
isa = PBXGroup;
children = (
F80B02D027EC1BDC00D63B45 /* homeCardSuccess.json */,
F80B02CE27EC1BD800D63B45 /* homeCardFail.json */,
EBEA383427948C2D00B5736A /* ticket_welcome.json */,
EBEA381E279450B800B5736A /* illust_confetti.json */,
F8ABAEFE2796163300C0F774 /* splash_logo.json */,
Expand Down Expand Up @@ -1478,8 +1484,10 @@
2B57F38427971F7A002A677D /* ProfileSetting.storyboard in Resources */,
EBA93A84279082B0009AE771 /* JoinCheck.storyboard in Resources */,
2B947203278CB00E005484C5 /* Futura Medium.otf in Resources */,
F80B02CF27EC1BD800D63B45 /* homeCardFail.json in Resources */,
F8F6D6FC2797527A00725537 /* HabitRoomMemberCVC.xib in Resources */,
2B9852032790310800CE40A7 /* CreateRoom.storyboard in Resources */,
F80B02D127EC1BDC00D63B45 /* homeCardSuccess.json in Resources */,
F80A3E53278C1C0C00728E07 /* Storage.storyboard in Resources */,
F82F58112793B3FF003E4174 /* .swiftlint.yml in Resources */,
EB625E7C278F271400C43DE9 /* DoingStorageCVC.xib in Resources */,
Expand Down
2 changes: 2 additions & 0 deletions Spark-iOS/Spark-iOS/Resource/Constants/Lottie.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ extension Const {
static let splashLogo = "splash_logo"
static let splashBackground = "splash_bg_iOS"
static let loading = "loading3"
static let homeCardSuccess = "homeCardSuccess"
static let homeCardFail = "homeCardFail"
}
}
}
1 change: 1 addition & 0 deletions Spark-iOS/Spark-iOS/Resource/Lottie/homeCardFail.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions Spark-iOS/Spark-iOS/Resource/Lottie/homeCardSuccess.json

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,14 @@ class CompleteFailDialogueVC: UIViewController {

private let bgView = UIView()
private let sparkFlakePatternImageView = UIImageView()
private let lottieView = AnimationView(name: Const.Lottie.Name.ticketWelcome)
private let lottieView = UIView()
private lazy var successLottieView = AnimationView(name: Const.Lottie.Name.homeCardSuccess)
private lazy var failLottieView = AnimationView(name: Const.Lottie.Name.homeCardFail)
private let titleLabel = UILabel()
private let subtitleLable = UILabel()
private let button = UIButton()

var roomID: Int?

var roomStatus: RoomStatus?

// MARK: - View Life Cycle
Expand All @@ -44,15 +45,12 @@ extension CompleteFailDialogueVC {

bgView.backgroundColor = .sparkWhite
bgView.layer.cornerRadius = 2

lottieView.loopMode = .loop
lottieView.contentMode = .scaleAspectFit
lottieView.play()


sparkFlakePatternImageView.image = UIImage(named: "sparkflakePattern2")

titleLabel.textColor = .sparkPinkred
titleLabel.font = .enMediumItatlicFont(ofSize: 24.0)
titleLabel.textAlignment = .center

subtitleLable.textColor = .sparkDeepGray
subtitleLable.font = .p1TitleLight
Expand Down Expand Up @@ -125,6 +123,27 @@ extension CompleteFailDialogueVC {
$0.leading.trailing.equalToSuperview().inset(106)
$0.height.equalTo(button.snp.width).multipliedBy(0.4)
}

switch roomStatus {
case .complete:
lottieView.addSubview(successLottieView)
successLottieView.snp.makeConstraints {
$0.edges.equalToSuperview()
}
successLottieView.loopMode = .loop
successLottieView.contentMode = .scaleAspectFit
successLottieView.play()
case .fail:
lottieView.addSubview(failLottieView)
failLottieView.snp.makeConstraints {
$0.edges.equalToSuperview()
}
failLottieView.loopMode = .loop
failLottieView.contentMode = .scaleAspectFit
failLottieView.play()
default:
return
}
}

// MARK: - Screen Change
Expand Down

0 comments on commit 8654366

Please sign in to comment.