Using Switch Statements And Case Let for Type Checking in Swift

September 8, 2018 | Swift, Control Flow, iOS, macOS, tvOS, watchOS

One thing that bothers many developers about using if statements for type checking in Objective-C is that it suggests a specific order of importance. For example, here's how you might use type checking in an Objective-C `prepareForSegue` method. This Swift version is much more concise, but we still have . . .

A 4-Step Approach To Code Reviews

August 19, 2018 | Code Reviews

When working with a team, code reviews are critical to maintaining a consistent, high-quality codebase. Hopefully, your project has thorough test coverage and your team has a shared understanding of best practices. You may even use tools like danger or SwiftLint to enforce components of the code review process. But when it comes to architecting and . . .

Downloading, Caching & Decoding Images Asynchronously with Alamofire: Part 2 (Swift 4)

August 11, 2018 | Swift, Alamofire, Networking, iOS, macOS

In Part 1 of this tutorial, I explained how to use the Alamofire and AlamofireImage libraries to asynchronously download and cache images to be displayed in a UICollectionView. At the end of that project, we still had a performance problem. UIImage by default waits until right before display to decode . . .

Downloading, Caching & Decoding Images Asynchronously with Alamofire: Part 1 (Swift 4)

August 11, 2018 | Swift, Alamofire, Networking, iOS, macOS

Downloading and caching images are common tasks in iOS development, especially when using collection and table views. In this tutorial, we're going to use the popular Swift networking library Alamofire and its companion image library AlamofireImage to build an app that displays images of Glacier National Park.

Getting Started With Vapor 3 Part 4: Using PostgreSQL

August 1, 2018 | Swift, Server-Side Swift, Vapor, macOS

In Part 3 we started working with a `Park` model and defined two endpoints that returned information about parks. We used an in-memory array to hold `Park` instances. In this tutorial we'll set up a PostgreSQL database . . .