Quantcast
Channel: Swift – Brice Pollock
Viewing all articles
Browse latest Browse all 7

Swift-Snippets: A Max Function for Optionals

$
0
0
The other day I needed to compare several values to determine which one was the maximum. Great, there is a max function built into the swift language! One catch, that max function only takes unwrapped values and I needed to compare optionals. Simply unwrapping these optionals and then calling the built in max function doesn’t scale because you […]

Viewing all articles
Browse latest Browse all 7

Trending Articles