How to add UIPickerView sections?
I have a requirement to make a UIPickerView look like the one in the image below.It has 5 different sections with 2 rows each.Section header titles should be a different color and non-selectable....
View ArticleHow to detect changes on UIPickerView?
I want to detect changes of UIPickerView value.If UIPickerView respond to addTarget I used a code like this:-(void) valueChange:(id)sender { change = YES;} UIPickerView *questionPicker = [[UIPickerView...
View ArticleUIPickerView selection indicator not visible in iOS10
I build my project in Xcode 8. UIPickerView separator lines are not visible in iOS 10 simulator and the devices, but works fine on iOS 9.3 devices and simulator. I tried to adjust the UIPickerView back...
View ArticleHow to detect values from UIPickerView while is rolling?
I'm trying to read data from a UIPickerView while is rolling.Didselectedrow is giving you back row value only when UIPicker is not moving. How can I catch values from UIPickerView while is rolling?I...
View ArticleSet a default value for UIPickerView in Swift?
How do I set the starting row of the picker view in Swift?I see there is a similar question for Objective-C, but I don't understand the code.
View ArticleCan you get rid of opaque rectangle in a UIPickerView?
I'd like to remove this gray box in a UIPickerView.I'm trying to recreate this.If there is a way I'd greatly appreciate it.Here's the code snippet. I'm not fluent in UIKit but I'd also love tips if...
View ArticleCustom PickerView won't show up after clicking a button Swift 5
So, I have some issues when creating up my project, the main issues is my custom class pickerview with toolbar won't appear after I click a button. I've add a target to the button (you can see on the...
View ArticleHow create a MonthPicker in SwiftUI?
I would like display a date picker contained only month and year.The default DatePicker display day, month and year. It's not possible to remove day and set a min and max date.How generate this month...
View ArticleUIPickerView default row
If I want to have the default row when the view controller starts as [2] or any other row number, how do I carry that out?var pickerData = ["2x2","4x4","6x6","8x8","12x12"] override func viewDidLoad()...
View ArticleMulti-Component Picker (UIPickerView) in SwiftUI
I'm trying to add a three-component Picker (UIPickerView) to a SwiftUI app (in a traditional UIKit app, the data source would return 3 from the numberOfComponents method), but I can't find an example...
View ArticleSwift 5: How can get the selected PickerView value inside a UIAlert Textfield?
I'm struggling to implement a UIPickerView inside the UIAlert as an input for the textfield. Here's what I've got (think of a simple TODO app);import UIKitclass ViewController: UIViewController { let...
View ArticleUIPickerView row text is hidden
I believe I have followed the steps to implement a UIPickerView to display an array of strings. For some reason, the text from titleForRow is hidden. I seems like the picker view is getting the array...
View Articlegetting error: country cannot be empty in pickerView
i made a picker view for country and city selection and it works fine but every time i come to that view, it gives an alert saying "country cannot be left empty" and after dismissing that it works...
View ArticleHow do I style Text in SwiftUI Picker View?
I have a time picker in SwiftUI and any modification that I apply to the Text values in the picker are ignored. How do I do this correctly? I am using Xcode 13 on Big Sur.Here is the result without any...
View ArticleHow to use a currency converter API in swift [closed]
the concept is when i enter some amount in "To Pay" textfield & select a currency from "to Pay" picker it will call api which i have called in pickers didSelect item. And when I select a currency...
View ArticleSwift tap gesture recognizer not triggering
I want to trigger the tap gesture whenever I tap on an item in my UIPickerView.I'm using the following code for LongPress Gesture which works fine. However if I switch to UITapGestureRecognizer,...
View ArticleAccessibility for UITextField with custom inputView (VoiceOver)
I have an UITextField that uses a UIPickerView with two columns as inputView. Image: When the user taps on the Target Range cell, the picker at the bottom appears.I'm wondering how to optimise the...
View ArticleSwift texfield input: pickerView, throws constraint error
When I click on of the five textfield, the picker view comes up but this error comes up. when you click on the lower two textfields the picker view doesn't´t come up. If I make this whole thing inside...
View ArticleHow to show keyboard when select specific row in pickerview [closed]
var emailPickers:[String] = ["naver.com", "hanmail.net", "daum.net", "gmail.com", "nate.com", "input by myself"]I want to: if picker's selected row index is 5 ("input by myself"), remove pickerview...
View Articledisplay done button on UIPickerview
I have written the following code in the viewDidLoad method: categoryPickerView=[[UIPickerView alloc]init];categoryPickerView.alpha = 0;[self.view...
View Article