Reading time: 2 min

This recipe shows how to style a TabView in SwiftUI - change its background color, text and icon colors and styles, as well as changing the badge coloring. This solution works on all SwiftUI and iOS versions. The end result looks like this:

preview

The recipe goes as follows:

  1. Set icon, text and...

Continue Reading...

Reading time: 3 min

This recipe shows how to customize a Progress view by implementing a custom ProgressViewStyle. You'll implement a circular progress bar that supports both definite and indefinite progress. The end result will look like this:

Preview

Progress view and ProgressViewStyle were introduced in SwiftU...

Continue Reading...

Reading time: 3 min

This recipe shows how to style a SwiftUI Form. Forms are a great way to quickly compose a UI for collecting data, such as an enrolment form or a settings panel, but fully styling them can be a bit a tricky.

The end result will look like this:

row

Starting position

OK, let's start with a an exe...

Continue Reading...

Reading time: 2 min

This recipe shows how to style SwiftUI DatePicker by setting its background and foreground / text color. There's no good, standard way of doing this, but a few tricks can get you there for the most part.

Here are a few examples of what you can do:

Graphical dialog Wheel dialog
Compact dialog Custom buttons

The images above show...

Continue Reading...

Reading time: 2 min

This tutorial shows how to style a navigation bar in SwiftUI - changing its background color, text color, as well as styling the status bar. The end result looks like this:

This component is available as a Swift Package in this repo.

The gist of the work is in using a ViewModifier...

Continue Reading...