Skip to content

Commit

Permalink
CHORE :: 리뷰 반영
Browse files Browse the repository at this point in the history
  • Loading branch information
cyj513 committed Sep 27, 2024
1 parent 042ad10 commit 3ce898b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,22 @@ import Core

public class PiCKLottieView: UIView {
private var lottieAnimationView: LottieAnimationView?
private var animation: LottieAnimation?
private let rawValue = UserDefaultStorage.shared.get(forKey: .displayMode) as? Int

public init() {
super.init(frame: .zero)

// let animation: LottieAnimation? = AnimationAsset.pickLottie.animation
var animation: LottieAnimation? {
switch rawValue {
case 2:
AnimationAsset.darkLottie.animation
private var animation: LottieAnimation? {
switch rawValue {
case 2:
return AnimationAsset.darkLottie.animation

default:
AnimationAsset.whiteLottie.animation
}
default:
return AnimationAsset.whiteLottie.animation
}
}

self.lottieAnimationView = .init(animation: animation)
public init() {
super.init(frame: .zero)

self.lottieAnimationView = .init(animation: animation)
self.configureView()
}
required init?(coder: NSCoder) {
Expand All @@ -44,8 +41,8 @@ public class PiCKLottieView: UIView {
}

public func play() {
self.lottieAnimationView?.play()
self.lottieAnimationView?.animationSpeed = 3.5
self.lottieAnimationView?.play()
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public class OnboardingViewModel: BaseViewModel, Stepper {
}

private let animate = PublishRelay<Void>()
private let showComponet = PublishRelay<Void>()
private let showComponent = PublishRelay<Void>()

public func transform(input: Input) -> Output {
input.viewWillAppear
Expand Down Expand Up @@ -68,8 +68,8 @@ public class OnboardingViewModel: BaseViewModel, Stepper {

input.componentAppear.asObservable()
.throttle(.seconds(2), scheduler: MainScheduler.asyncInstance)
.map { _ in self.showComponet.accept(()) }
.bind(to: showComponet)
.map { _ in self.showComponent.accept(()) }
.bind(to: showComponent)
.disposed(by: disposeBag)

input.clickOnboardingButton
Expand All @@ -79,7 +79,7 @@ public class OnboardingViewModel: BaseViewModel, Stepper {

return Output(
animate: animate.asSignal(),
showComponet: showComponet.asSignal()
showComponet: showComponent.asSignal()
)
}

Expand Down

0 comments on commit 3ce898b

Please sign in to comment.