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

QuestView 작성, 버튼 클릭시, AddQuestsView present #25

Merged
merged 12 commits into from
Nov 17, 2022

Conversation

jinwoong16
Copy link
Collaborator

@jinwoong16 jinwoong16 commented Nov 16, 2022

📕 Issue Number

Close #24

📙 작업 내역

구현 내용 및 작업 했던 내역

  • Quest View 구현
  • Quest Header 추가
    • 레이블과 버튼이 존재합니다.
  • 버튼을 누르면 AddQuestsViewController가 present되게 구현
    Simulator Screen Recording - iPhone 14 Pro - 2022-11-16 at 22 56 22

📘 작업 유형

  • 신규 기능 추가
  • 버그 수정
  • 리펙토링
  • 문서 업데이트

📋 체크리스트

  • Merge 하는 브랜치가 올바른가?
  • 코딩컨벤션을 준수하는가?
  • PR과 관련없는 변경사항이 없는가?
  • 내 코드에 대한 자기 검토가 되었는가?
  • 변경사항이 효과적이거나 동작이 작동한다는 것을 보증하는 테스트를 추가하였는가?
  • 새로운 테스트와 기존의 테스트가 변경사항에 대해 만족하는가?

📝 PR 특이 사항

PR을 볼 때 주의깊게 봐야하거나 말하고 싶은 점

  • QuestView는 테이블뷰이지만, 그의 델리게이트는 HomeViewController가 아닙니다. 현재는 QuestViewDelegate라는 클래스를 따로 만들어 이 친구가 델리게이트 역할을 수행합니다. HomeViewController에서는 QuestView와 이 델리게이트를 연결해주는 역할만 하고 있습니다.
final class QuestViewDelegate: NSObject, UITableViewDelegate {
    private let header: QuestViewHeader
    
    init(header: QuestViewHeader) {
        self.header = header
    }
    
    func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
        return 75
    }
    
    func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
        return header
    }
    
    deinit {
        print("deinit")
    }
}
private var questViewDelegate: QuestViewDelegate?

 override func viewDidLoad() {
        super.viewDidLoad()
        questViewDelegate = QuestViewDelegate(header: questViewHeader)
        questView.delegate = questViewDelegate
}



@jinwoong16 jinwoong16 linked an issue Nov 16, 2022 that may be closed by this pull request
2 tasks
@jinwoong16 jinwoong16 merged commit 9941094 into develop Nov 17, 2022
@jinwoong16 jinwoong16 deleted the feature/QuestView branch November 17, 2022 03:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Quest View
1 participant