diff --git a/Projects/Modules/DesignSystem/Sources/Component/Lottie/PiCKLottieView.swift b/Projects/Modules/DesignSystem/Sources/Component/Lottie/PiCKLottieView.swift index 2bae0d4..1337559 100644 --- a/Projects/Modules/DesignSystem/Sources/Component/Lottie/PiCKLottieView.swift +++ b/Projects/Modules/DesignSystem/Sources/Component/Lottie/PiCKLottieView.swift @@ -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) { @@ -44,8 +41,8 @@ public class PiCKLottieView: UIView { } public func play() { - self.lottieAnimationView?.play() self.lottieAnimationView?.animationSpeed = 3.5 + self.lottieAnimationView?.play() } } diff --git a/Projects/Presentation/Sources/Scene/OnBoarding/OnboardingViewModel.swift b/Projects/Presentation/Sources/Scene/OnBoarding/OnboardingViewModel.swift index 6c591a5..05efdfb 100644 --- a/Projects/Presentation/Sources/Scene/OnBoarding/OnboardingViewModel.swift +++ b/Projects/Presentation/Sources/Scene/OnBoarding/OnboardingViewModel.swift @@ -37,7 +37,7 @@ public class OnboardingViewModel: BaseViewModel, Stepper { } private let animate = PublishRelay() - private let showComponet = PublishRelay() + private let showComponent = PublishRelay() public func transform(input: Input) -> Output { input.viewWillAppear @@ -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 @@ -79,7 +79,7 @@ public class OnboardingViewModel: BaseViewModel, Stepper { return Output( animate: animate.asSignal(), - showComponet: showComponet.asSignal() + showComponet: showComponent.asSignal() ) }