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

Open
#71 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
38/100
Issue type
Documentation
Clarity
Mostly clear
Activity status
Stale
Tech stack
swift
Domain
documentation

Research direction

No file or test is named in the issue. Start by locating the delegate and data source naming guidance in the style guide, then compare the existing conventions with the examples in the issue. Done means the guide clearly documents the relevant noun- and verb-based naming rules with representative Swift examples.

Written by the indexing model from the issue text.

Description

이슈 중복 확인

확인했습니다

카테고리

델리게이트


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

Dominant language
No language data
Stars
273
Forks
42
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from DeveloperAcademy-POSTECH/swift-style-guide

All issues in DeveloperAcademy-POSTECH/swift-style-guide

Similar issues

More Documentation issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.