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

상세화면의 휴무일 expandable 테이블뷰 헤더 xib로 구현 #42

Open
jinios opened this issue Sep 30, 2018 · 0 comments
Open
Assignees
Labels
refactor need to refactor

Comments

@jinios
Copy link
Owner

jinios commented Sep 30, 2018

  • 헤더를 UITableViewCell클래스로 구현하고, cell을 deque하는 tableView.dequeueReusableCell(withIdentifier: , for: )로 헤더를 불러올 경우, 계속 셀을 재사용하겠다는 용도이기때문에 헤더뷰 구현이 제대로 되지않음.

  • 임시방편으로 헤더의 contentView프로퍼티를 리턴하여 사용하였으나, 좋은 방법이 아니어서 xib로 뷰를 만들고 UIView를 리턴하는 방식으로 사용하도록 변경

  • 이전 코드

    func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
        guard let branchData = branchData else { return UIView() }
        let view = tableView.dequeueReusableCell(withIdentifier: "headerCell") as! HolidayHeaderCell

        let contentView = view.contentView
        return contentView
    }
@jinios jinios added the refactor need to refactor label Sep 30, 2018
@jinios jinios self-assigned this Sep 30, 2018
jinios added a commit that referenced this issue Oct 5, 2018
- Implement HeaderView for tableView in DetailViewController
- Using xib file and UITableViewHeaderFooterView class
jinios added a commit that referenced this issue Oct 5, 2018
- Modify to set a tableview header: using UITableViewHeaderFooterView,xib file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactor need to refactor
Projects
None yet
Development

No branches or pull requests

1 participant