Creating a Segmented Control in SwiftUI

Stephen Feuerstein Tutorials

How do you think you would create a segmented control in SwiftUI? Just use UISegmentedControl, right? Wrong! Similar to the change a while back with UIAlertView rolling into a style under UIAlertController, SwiftUI introduces a View called Picker that has different styles. Setting Up First let’s get set up with what data we’re going to display with our segmented control. …