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 [#102] Challenge 화면 챌린지 생성 경우 구현 #103

Merged
merged 6 commits into from
Jan 17, 2024

Conversation

kim-seonwoo
Copy link
Member

👾 작업 내용

  • 14일, 7일, 챌린지 생성 타입에 따라 백그라운드 이미지를 설정하였습니다.
  • 챌린지 생성 시 나타날 뷰를 설정하였습니다.
  • 챌린지 생성하기 버튼을 눌렀을 때 CreateChallengePeriodViewController 로 push되게 구현하였습니다.
  • 뷰 컨트롤러와 타이틀 셀에 각각 Bool 변수와 타입을 설정해 주는 식으로 일단 분기 처리를 구현하였습다.
  • 추후 통신 과정을 통하여 이 변수를 업데이트 시키고 이 변화를 관찰하여 뷰를 바꾸는 방식으로 추후 처리하도록 하겠습니다.

🚀 PR Point

func getChallengeViewController() -> ChallengeViewController? {
        var responder: UIResponder? = self
        while let nextResponder = responder?.next {
            if let viewController = nextResponder as? ChallengeViewController {
                return viewController
            }
            responder = nextResponder
        }
        return nil
    }
  • 다음 코드로 인해 상위 뷰 컨트롤러를 가져올 수 있었어요!

📸 스크린샷

구현 내용 스크린샷
챌린지 생성 구현부 Simulator Screen Recording - iPhone 13 mini - 2024-01-17 at 21 54 46

🚀 기기 대응

기기명 Iphone 13 mini Iphone 14 Iphone 15 pro Iphone SE(3rd)
스크린샷 image image image image

✅ Issue

Resolved #102

@kim-seonwoo kim-seonwoo linked an issue Jan 17, 2024 that may be closed by this pull request
@kim-seonwoo kim-seonwoo self-assigned this Jan 17, 2024
@kim-seonwoo kim-seonwoo added 😎선우 선우의 issue 🌈 feat 기능 구현 labels Jan 17, 2024
@kim-seonwoo kim-seonwoo added this to the 🚀1차 스프린트🚀 milestone Jan 17, 2024
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.

nice.

}

private func setConstraints() {
grayBackgroundView.snp.makeConstraints {
$0.leading.trailing.bottom.equalToSuperview()
$0.leading.trailing.equalToSuperview()
Copy link
Contributor

Choose a reason for hiding this comment

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

p5. horizontalEdge로 하는건 어떠신지?

$0.top.equalToSuperview().offset(-200)
}

backgroundImageView.snp.makeConstraints {
$0.leading.trailing.bottom.equalTo(grayBackgroundView)
Copy link
Contributor

Choose a reason for hiding this comment

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

p5. 이것도 호리즌탈엣지 어떠신지

@@ -52,13 +48,18 @@ final class ChallengeViewController: UIViewController {
}

private func setViewHierarchy() {
view.addSubviews(navigationBar)
view.addSubviews(navigationBar, challengeView)
}

private func setConstraints() {
navigationBar.snp.makeConstraints {
$0.top.leading.trailing.equalToSuperview()
Copy link
Contributor

Choose a reason for hiding this comment

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

p5. 호리즌탈엣지 어떠신지


challengeView.snp.makeConstraints {
$0.top.equalTo(navigationBar.snp.bottom)
$0.leading.trailing.bottom.equalToSuperview()
Copy link
Contributor

Choose a reason for hiding this comment

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

p5. 호리즌탈엣지 어떠신지

challengeViewController.onTabButton()
}
}

Copy link
Contributor

Choose a reason for hiding this comment

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

p2. 빈 줄 지워주세여

@kim-seonwoo kim-seonwoo merged commit 6d93622 into develop Jan 17, 2024
@Zoe0929 Zoe0929 deleted the feat/#102-Challenge branch January 17, 2024 15:02
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] 챌린지 생성 백그라운드 뷰 구현
2 participants