Last active
January 17, 2016 22:19
-
-
Save getmetorajesh/3dd3aaa67d9880eb828e to your computer and use it in GitHub Desktop.
Swift tips
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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