Skip to content

Swift Style Guides

Farhan Patel edited this page Nov 23, 2017 · 14 revisions

Swift code should generally follow the conventions listed at https://github.com/raywenderlich/swift-style-guide.

Some rules we've worked out we all like:

  • Selectors: #selector(ClassName.methodName) is clearer than #selector(methodName).
  • Type inference: .white is better than UIColor.white.
  • Use of self is contentious.
Clone this wiki locally