Mandating Maximum Line Widths
Some style guides mandate a maximum column count like 80 (LLVM style[32]), 120, and 160 (LinkedIn style[33]). The Swift Standard Library group adopts LLVM style with 80-character lines, but the Foundation and Dispatch library teams have adopted different house styles that aren’t tied to these limits.
When using maximum line widths, Xcode offers a visible page guide that you set in the Preferences > Text Editing pane. When working outside line-width limitations, reserve manual wrapping for clarity and structure emphasis, such as when laying out parameters or distinguishing generic declarations. Xcode does a fine job of presenting long lines.
Xcode’s Text Editing preference pane also enables you to do the following: ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access