![] (http://img.wallpaperfolder.com/f/4FE4BAB1927C/fonds-cran-tumblr-pc-et.jpg)
$ git clone https://github.com/loganblevins/Luna.git
$ cd <yourPathToLuna>
$ sudo gem install cocoapods
$ pod install
- Open 'Luna.xcworkspace'
- 😎
- Branch from master
- Open Pull Request
- Wait for
- Merge into master
-
Follow Swift API Design Guidelines
- Names of types and protocols are
UpperCamelCase
. Everything else islowerCamelCase
. - Include all the words needed to avoid ambiguity.
- Omit needless words.
- Avoid abbreviations.
- Name variables, parameters, and associated types according to their roles.
e.g.var greeting = "Hello"
, notvar string = "Hello"
- Name functions and methods according to their side-effects.
- Uses of Boolean methods and properties should read as assertions about the receiver when the use is non-mutating.
e.g.
x.isEmpty
,line1.intersects( line2 )
- Names of types and protocols are
-
Clamshell curly brackets
if let _ = textField.text where !textField.text.isEmpty
{
print( "Non-empty textField" )
}
else
{
print( "Empty textField" )
}
- Comments with empty ending line
// `Characters` view doesn't honor certain characters.
// Rather, it treats characters as they appear visually.
// `utf16` view honors all characters, regardless of visuals.
//
var count: Int
{
return self.utf16.count
}
- Spacing between operators
extension String
{
func contains( find: String ) -> Bool
{
return range( of: find ) != nil
}
}
- Use tabs in Xcode...(not spaces)