Questions tagged [pickerview]

72 questions
4
votes
3 answers

How to use one pickerview for multiple textfield?

I am trying to build something (I am new to Xcode and swift) where I can choose a meal for a day from an array with Picker View, and I want my choice to display in that specific day's textfield. I have got this working, but for 1 day only. How can I…
2
votes
1 answer

UIPickerView as input for TextField() in SwiftUI

I am trying to display a picker view as keyboardinputtype for TextField() in SwiftUI. I want to display a list of nationalities which the user can then select.
2
votes
1 answer

SwiftUI - Can't add modifiers to Picker View within a form

I'm currently working on Project 4 of #hackingwithswift. I'm having the problem of not being able to change the style of my picker from within a form view. Here's a little snippet of the code I'm working on. Please assume the rest of the code is…
lulubasher
  • 41
  • 7
1
vote
1 answer

Picker view is not changing when you try to select a different option in swiftui

I am using in swiftUI. When select picker, it is not changing. Here is code.. Here is datamodel: struct SourceAccountModel:Codable,Identifiable{ var id: Int let accountNumber: String let accountTitle: String let priaryAccount:…
Enamul Haque
  • 4,789
  • 1
  • 37
  • 50
1
vote
0 answers

How can I set the width of a Custom PickerView in SwiftUI?

No matter what I try, I cannot control the width of a custom picker view integrated into Swift UI with UIViewRepresentable. Here is the ContentView: struct ContentView: View { @State private var pickerData:[[String]] = [ …
Hyoryusha
  • 175
  • 1
  • 11
1
vote
1 answer

PickerView disabled and doesn't work in SwiftUI

I don't understand why picker view doesn't work. I used this code: import SwiftUI struct NewChecklistItemView: View { var colors = ["Red", "Green", "Blue", "Tartan"] @State private var selectedColor = 0 var checklist: Checklist @State…
Parcker
  • 219
  • 1
  • 10
1
vote
1 answer

picker view generate number 20 to 80

How can I create a code that generates numbers from 20 to 80? using a pickerviewlet ages = ["20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31 "," 32 "," 33 "," 34 "," 35 "," 36 "," 37 "," 38 "," 39 "," 40 "," 41 "," 42 "," 43 ",…
1
vote
1 answer

No display of value in SwiftUI Picker view

I recently changed some picker code in SwiftUI to use a CaseIterable Enum rather than an array of items. Here is the enum: enum ReturnTypes : String, CaseIterable { case Scaler case Vector case Matrix } Here is the picker code: …
Ferdinand Rios
  • 972
  • 6
  • 18
1
vote
1 answer

objective c how to remove the item in second and third text field based on select the first text field item

I have one UIPickerview. I have a json response. I have a three text fields. If user select the first text field display picker view then user select the particular item. And second and third text field also same. My requirement Is if user select…
satyam
  • 89
  • 1
  • 7
1
vote
1 answer

Use cupertino picker instead of keyboard while inputting a textformfield flutter

I am an ios developer who is new to Flutter. In my app, I have TextFormField, whose input type is the options give in the picker. I am struggling to show the picker view as an input view instead of the keyboard. My desired output is as follows image…
1
vote
0 answers

React-Native pickerview items position is outside of the pickerview

When I add a picker in my react native app, the picker is huge I tried changing the size of the view to be 30, but it looks like this didn't change the position of the picker items. I would like each picker item to be the height of the picker, and…
Sam
  • 1,765
  • 11
  • 82
  • 176
1
vote
1 answer

Populating array with database data and calling it on pickerView

I need to populate an array using data from a database. When I do that I am getting an error message from my pickerView function. Before, I had this array hard coded as below and now I want that coming from a database query. var recomendMedsTypes =…
1
vote
2 answers

Using same pickerView for two buttons returning empty data

Here's my code . I am trying to use UIPickerview for few buttons with different data. but it show's me blank gray picker view when I run my project. some told me that I have to reload the pickerView but I used it for example "mainPV.delegate = self…
1
vote
0 answers

swift picker view row out of range if row greater the 15

I am working with a multiple picker view in iOS. Everything works perfectly only if the selected rows in a component is lower than 16. In few words, even if the component has more than 16 items it looks that row can not point over the 15th…
1
vote
6 answers

Multiple pickerviews in single viewController

Is it possible to have a single pickerView in swift which changes its value based on the button pressed. I could not figure out a way to implement more than one parameter through pickerView in a single ViewController. An alternative solution like a…
1
2 3 4 5