Articles tagged 'swift'

Either in Swift

Friday, August 26, 2016 A.D.

Let's suppose we have an iOS application that requires users to log in. Here's a User struct: 1 2 3 4 5 struct User { let name: String let occupation: String let hometown: String } And here's a simple function that might handle the login process...… .

I am ErrorType

Thursday, July 28, 2016 A.D.

I'm going to be talking about Swift's ErrorType in the next few posts, and I thought I'd talk a little more about it since the built in documentation on it is… lacking. It's an empty protocol! What good is that? Well, it turns out that anything that...… .

Overloading in Swift

Tuesday, June 28, 2016 A.D.

You can overload functions in Swift. Let's try it!… .