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 . . .

Getting Started With Vapor 3 Part 3: Basic Routing

July 28, 2018 | Swift, Server-Side Swift, Vapor, macOS

In Part 2 we explored the basic structure of a Vapor app. Next we'll look at how to declare simple routes with dynamic path components and query parameters. Our API will model information about U.S. national parks, so we'll start by declaring a simple `Park` model. For now, we'll keep an array of parks in memory and define two routes.

Making Views More Testable & Reusable

July 22, 2018 | Swift, Unit Testing, iOS, macOS, tvOS, watchOS

In this tutorial, we'll see how we can use protocols to make custom view subclasses more generic. The benefit is that they'll be easier to test and reuse, and our code will be easier to read and maintain.