PickerView In SwiftUI
![Image](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjn7Q2wrEiThUa6pcmoZcg5CCBHG9ht2XMadLU_pKR-rZqPJoCBtQyXhBvY3Y8E90jpOAml0YfesJkoU-qBv-rKi_9zlCMmgpt_0B0t8ZDTq1o_fw2GZXj8sKxNs7mIDVwtV6ZjwCIp9n8H/s640/Screenshot+2020-04-20+at+6.57.21+PM.png)
As we know to PickerView is similar to a Dropdown in iOS. You can select from a set of provided items within a PickerView. So let's get started and add a simple PickerView where user can select a Number from 1 to 10. Code Snippet: struct ContentView : View { var body : some View { Picker (selection: . constant ( 4 ), label: Text ( "Select Numbers" )) { ForEach ( 1 ..< 11 ) { index in Text ( " \(index) " ). tag (index) } } } } Explanation: Picker takes two parameters here, selection and label . selection means the item which you want to be selected by default (number 5 here). label means the Title of Picker (Select Numbers here). Inside PickerView I have passed TextView's with each having number indexing 1 to 10. Hence th...