Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat [#16] OnboardingProgressView 구현 #20

Merged
merged 6 commits into from
Jan 6, 2024

Conversation

kim-seonwoo
Copy link
Member

👾 작업 내용

  • Onboarding과 챌린지 생성 전반에 이용되는 ProgressView를 구현하였습니다.
  • progressBar 생성 시 몇 번째 페이지로 넘어가는지 Int를 파라미터로 넘겨줍니다.
private var progressBar = OnboardingProgressView(progressAmount: 4)
  • 사용하는 viewController에서 viewDidLoad분에 다음 메소드를 호출하여 사용합니다.
override func viewDidLoad() {
    progressBar.setProgressBar()
}
  • 애니메이션에 관련된 작업을 하는 setProgressBar는 다음과 같습니다.
  • 이 부분에서 self.progressAmount - 1의 계산을 통하여 전 영역에서 막대가 올라가는 애니메이션을 구현하였습니다.
    func setProgressBar() {
        self.setProgress(Float(self.progressAmount - 1) / 6.0, animated: false)
        
        DispatchQueue.main.async() {
            UIView.animate(withDuration: 0.5, delay: 0, options: [.beginFromCurrentState, .allowUserInteraction], animations: { [unowned self] in
                self.setProgress(Float(self.progressAmount) / 6.0, animated: true)
            })
        }
    }

🚀 PR Point

  • 폴더링에 관해서 최초 챌린지 생성 뷰에도 쓰이지만, 이 역시 최초 온보딩 과정에서만 쓰이므로 일단 Onboarding 폴더에 넣었습니다.
  • func setProgressBar()부분에 대한 새로운 생각을 듣고 싶습니다.

📸 스크린샷

구현 내용 스크린샷
화면종류

✅ Issue

Resolved #16

@kim-seonwoo kim-seonwoo added 😎선우 선우의 issue 🌈 feat 기능 구현 labels Jan 6, 2024
@kim-seonwoo kim-seonwoo added this to the 🚀1차 스프린트🚀 milestone Jan 6, 2024
@kim-seonwoo kim-seonwoo self-assigned this Jan 6, 2024
@kim-seonwoo kim-seonwoo linked an issue Jan 6, 2024 that may be closed by this pull request
Copy link
Member

@Zoe0929 Zoe0929 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P5. 고생하셨습니다! 진짜 빠르다잉 ~

Copy link
Contributor

@boyeon0119 boyeon0119 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

p5. 프로그래스 애니메이션까지 고생하셨어욤!!

@kim-seonwoo kim-seonwoo merged commit e77ba63 into develop Jan 6, 2024
@kim-seonwoo kim-seonwoo deleted the feat/#16-OnboardingProgressBar branch January 9, 2024 02:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🌈 feat 기능 구현 😎선우 선우의 issue
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

[Feat] Onboarding 프로그레스바UI 구현
3 participants