-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Swift Style Guides
Cyndi Chin edited this page Jun 4, 2024
·
14 revisions
This page is a work in progress. Many of the style rules we follow are covered by Swiftlint and we are working on adding more.
Some rules we've worked out we all like:
- Selectors:
#selector(ClassName.methodName)is clearer than#selector(methodName). - Type inference:
.whiteis better thanUIColor.white. - Only use
selfif required. - Always use an explicit
return. As a team, we voted against enabling implicit_return for swiftlint.