Tutorials Stephen Feuerstein Tutorials Stephen Feuerstein

Using Transitions in SwiftUI

Views in SwiftUI can be added to and removed from other views easily by checking a state property. When views are added or removed using just a normal bool check they are automatically given a fade in/out transition by default. That’s great for a lot of cases, but what if you want to do something different, like show a message coming in from the top?

Read More
Tutorials Stephen Feuerstein Tutorials Stephen Feuerstein

Showing an Alert with SwiftUI

Showing an alert is a great way to notify a user of important information related to your app such as a payment going through or an error loading something from the server. In SwiftUI Apple has added a modifier that makes it super easy to show an alert based off your view’s state.

Read More
Tutorials Stephen Feuerstein Tutorials Stephen Feuerstein

Horizontal Scrolling in SwiftUI

Lists are great for displaying vertically scrolling collections of data. But what if you want something that scrolls horizontally? There isn’t a fully native SwiftUI version of UICollectionView yet, so for the time being you have to get a little creative using a combination of ScrollView and HStack.

Read More
Tutorials Stephen Feuerstein Tutorials Stephen Feuerstein

How to Make Custom List Rows

A best practice in SwiftUI architecture is to break views down into smaller components that you combine together to build more complex views. Learn how to do just that by building custom List rows in this tutorial!

Read More
Tutorials Stephen Feuerstein Tutorials Stephen Feuerstein

Steppers in SwiftUI

Steppers are really useful if you want to give a user +/- buttons to change a specific value like volume, font size, etc.

Let’s take a look at how to use a Stepper to update the font size of some Text in SwiftUI.

Read More
Stephen Feuerstein Stephen Feuerstein

Updating Your View for Dark Mode in SwiftUI

I don’t know about you, but I use dark mode on everything. Well, everything that supports it at least! And by the end of this post you’ll have everything you need to update your SwiftUI views to support dark mode.

Read More
Stephen Feuerstein Stephen Feuerstein

Creating a Repeating Animation in SwiftUI

SwiftUI is so amazing because of how much it takes care of for you. When you update the state your view updates automatically. Throw a call to withAnimation in there and it will even animate the changes! But what if you want an animation that repeats?

Read More
Stephen Feuerstein Stephen Feuerstein

How to Layer Views in SwiftUI Using ZStack

One of the first things I wondered when I started messing with SwiftUI was how am I supposed to build layered views? Every example I came across talked about horizontal stacks, vertical stacks, and lists. But what if I wanted to put text on top of another view? Then I found the answer…

ZStacks.

Read More