Skip to content

Commit

Permalink
⚡️ :: [#974] 애니메이션 초기화 과정 안보이게 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
KangTaeHoon committed Sep 1, 2024
1 parent 5201a85 commit eedaac1
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ final class ListStorageViewController: BaseReactorViewController<ListStorageReac
override func viewDidAppear(_ animated: Bool) {
super.viewDidAppear(animated)
LogManager.analytics(CommonAnalyticsLog.viewPage(pageName: .storagePlaylist))
listStorageView.resetParticeAnimation()
listStorageView.startParticeAnimation()

// 플리 상세에서 내 리스트로 돌아오는 경우, 플로팅 버튼 올림
NotificationCenter.default.post(
Expand All @@ -75,6 +75,11 @@ final class ListStorageViewController: BaseReactorViewController<ListStorageReac
)
}

override func viewDidDisappear(_ animated: Bool) {
super.viewDidDisappear(animated)
listStorageView.removeParticeAnimation()
}

override func configureUI() {
reactor?.action.onNext(.viewDidLoad)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ private protocol ListStorageStateProtocol {
func updateIsEnabledRefreshControl(isEnabled: Bool)
func updateIsHiddenLoginWarningView(isHidden: Bool)
func updateIsHiddenEmptyWarningView(isHidden: Bool)
func resetParticeAnimation()
func startParticeAnimation()
func removeParticeAnimation()
}

private protocol ListStorageActionProtocol {
Expand Down Expand Up @@ -140,8 +141,12 @@ private extension ListStorageView {
}

extension ListStorageView: ListStorageStateProtocol {
func resetParticeAnimation() {
particleAnimationView.resetAnimation()
func startParticeAnimation() {
particleAnimationView.startAnimation()
}

func removeParticeAnimation() {
particleAnimationView.removeAnimation()
}

func updateIsHiddenEmptyWarningView(isHidden: Bool) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,11 +152,6 @@ private extension ParticleAnimationView {
}

extension ParticleAnimationView: ParticleAnimationStateProtocol {
@objc func resetAnimation() {
removeAnimation()
startAnimation()
}

@objc func removeAnimation() {
self.subviews.forEach { $0.removeAllAnimations() }
}
Expand Down

0 comments on commit eedaac1

Please sign in to comment.