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

[내용 추가] Naming convention for the delegates and the data sources methods #71

Open
x-0o0 opened this issue Apr 15, 2023 · 0 comments

Comments

@x-0o0
Copy link

x-0o0 commented Apr 15, 2023

이슈 중복 확인

확인했습니다

카테고리

델리게이트


protocol UserTableViewDelegate {
        func tableView(
            _ tableView: UITableView,
            willDisplayCell cell: Cell,
            cellForRowAt indexPath: IndexPath)
        )
        func tableView(
            _ tableView: UITableView,
            numberOfRowsInSection section: Int) -> Int
        )
    }

delegate 역할, dataSource 역할에 따른 네이밍 규칙을 명시해주면 좋을 것 같습니다.

e.g., When naming the data source method, please make sure that the second parameter name ends in a noun form. For example, when the data source method returns the number of rows in the specific section, you should name it like tableView(_:numberOfRowsInSection:) -> This allows you to infer what value the method returns.

e.g., When naming the data source method, please make sure that the second parameter name ends in a verb form. For example, myTableView(_:didTapCell:forRowAt:), myTableView(_:willDisplayCell:forRowAt:)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant