Skip to content

Commit

Permalink
[#49] viewDidLoad 코드 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
cchanmi committed Jul 16, 2022
1 parent bfb8a0d commit 194f8be
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,7 @@ final class LetterOnboardingViewController: UIViewController {
super.viewDidLoad()
setLabelUI()
setLayout()
if letterNumber == 1 {
setFirstInitAnimation()
} else if letterNumber == 2 {
setSecondInitAnimation()
} else if letterNumber == 4 {
print("네번째 온보딩 편지")
}
setAnimation()
}

// MARK: - Custom Method
Expand All @@ -57,6 +51,16 @@ final class LetterOnboardingViewController: UIViewController {
dearLabelTopConstraint.constant = (getDeviceHeight() == 667) ? -58 : -64
}

private func setAnimation() {
if letterNumber == 1 {
setFirstInitAnimation()
} else if letterNumber == 2 {
setSecondInitAnimation()
} else if letterNumber == 4 {
print("네번째 온보딩 편지")
}
}

private func setFirstInitAnimation() {
DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) {
self.setFirstComponentsAnimation()
Expand Down Expand Up @@ -101,6 +105,7 @@ final class LetterOnboardingViewController: UIViewController {
present(playTapeOnboarding, animated: true)
}
}

// MARK: - Animation function

private func setFirstComponentsAnimation() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,7 @@ final class PlayTapeOnboardingViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
setComponentsUI()
if playTapeNumber == 1 {
hideComponentsUI()
showComponentsUI()
}
setPlayerButtonUI()
}

// MARK: - Custom Method
Expand All @@ -54,7 +51,13 @@ final class PlayTapeOnboardingViewController: UIViewController {
}
explanationLabel.isHidden = true
circleButton.isHidden = true
startPlayerButton.isHidden = true
}

private func setPlayerButtonUI() {
if playTapeNumber == 1 {
hideComponentsUI()
showComponentsUI()
}
}

// MARK: IBAction
Expand Down

0 comments on commit 194f8be

Please sign in to comment.