Configure Firebase with SwiftUI

You can use Firebase on all Apple platforms like iOS, watchOS, macOS, etc. To integrate Firebase into a SwiftUI project, follow these steps: Step 1: Set up the Firebase Project Create a Firebase Project: Go to the Firebase Console and create a new project or select an existing one. Give it a name and hit … Read more

ProgressView in SwiftUI

We can show progress of a task or operation using ProgressView in SwiftUI. Here is an example of ProgressView: This will show a circular progress. We can add title with ProgressView: ProgressView with value: This will show us a horizontal ProgressView. Here is another example with Label: Here is all code: Output: Here is an … Read more

Picker styles in SwiftUI

SwiftUI’s Picker is a user interface element that allows users to make selections from a set of options. Picker style change automatically based on platform, OS version and how we used them. For example, here is default picker: Output: Default picker in iOS If we use Picker inside a Form, output will change based on … Read more

DatePicker in SwiftUI

DatePicker allows users to select a date or time. Here’s a basic example of how you can use a DatePicker to select a date in SwiftUI: Like other input, we have to provide a State variable as selection in DatePicker, that will hold the selected date: Output: By default, DatePicker let user to select both … Read more

Slider in SwiftUI

Slider is a user interface component that allows users to select a value from a range. We can create a simple slider like this: To create a slider in SwiftUI, it’s essential to initialise it with a State variable of floating-point type. By default, the slider’s range spans from 0 to 1. As the slider … Read more