Skip to content

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

@x-0o0

Description

@x-0o0

이슈 중복 확인

확인했습니다

카테고리

델리게이트


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:)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions