Skip to content

Instantly share code, notes, and snippets.

@getmetorajesh
Last active January 17, 2016 22:19
Show Gist options
  • Select an option

  • Save getmetorajesh/3dd3aaa67d9880eb828e to your computer and use it in GitHub Desktop.

Select an option

Save getmetorajesh/3dd3aaa67d9880eb828e to your computer and use it in GitHub Desktop.
Swift tips
extension FirstOrderAPI {
var method: HTTPMethod {
switch self {
case .customer,.broker, .users:
return .GET
case .AddCustomer,.AddBroker, .AddUsers:
return .POST
}
}
}
### Operator params:
[1,2,3,4].reduce(0, combine: +)
### simple reuse identifiers:
let reuseIdentifier = String(SpaceshipTableViewCell)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment