In UIKit it is very straight-forward to set a background on any view — in SwiftUI it is a little bit trickier

Multi-colored background behind bike.

From plain colors to gradients and custom views, this article will teach you how to add a background to a SwiftUI view, and how to wrap the functionality to reuse it whenever you need it.

The Basics

Let’s start with a simple view:

Colored background

In this article I will explain to you…

Swift

How to create a great structure for environment configuration in Swift

In real-world apps, developers deal with many different backend environments. Every environment has its properties and configuration so it is important to have a proper structure to manage them.

In this article, I explain how to create a great structure for environment configuration in Swift, that can easily evolve but…

UI Testing is a great thing to keep apps maintainable and reliable during its whole lifecycle, but sometimes this user interface testing could become a big pain.

Here we will transform a bad test case into a better one, applying some code refactors.

In this article, it’s assumed that the…

Pablo Blanco

Senior iOS Engineer @ Expedia Group

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store