iOS, UIPickerView create programmatically, empty view, delegates work
@Hey everybody,I have trouble w/ UIPickerView. I'm planning to create a view controller which should allow user to specify the one of the next day. PickerView should show strings like "wed, 1 Dec",...
View ArticleChange the color of a focused element (Picker) SwiftUI - WatchOS
How can I change the focus color of a selected element in WatchOS7 with swiftUI. Here's my example below with a Picker whose focus color is green (the default one) but I want to change it to blue to be...
View ArticleHow to block days in UIDatePicker for iOS
I'm using a Date picker on my IOS app, and I want to know if is possible to block some days. For example, I need to block all mondays from a year, is this possible?Thanks.
View ArticleCreate a done button for RxPickerViewAttributedStringAdapter
self.genderSource = RxPickerViewAttributedStringAdapter<[[DKProfileOption]]>.init(components:[]) { dataSource, pickerView, components inreturn 1} numberOfRowsInComponent: { [weak self]...
View ArticleTrying to identify an element on Apple Guideline website for use with Swift
I was accessing one of the Apple websites about Pickers. The site below:https://developer.apple.com/design/human-interface-guidelines/components/selection-and-input/pickers/I was interessed to use the...
View ArticleHow to create a custom UIPickerView to connect to UITextField in Swift
I was triyng to create a custom UIPickerView bacause I will need many different custom PickerViews to connect to my one UIViewController.I create the following code:let estadosArray =...
View ArticleUIPIckerview strange display behaviour
I have an app written a few years ago using UIPickerView and had been working until now.It doesn't display properly for iOS 16. So I thought I'd use Xcode to submit another build with the latest...
View ArticleUIPicker not showing in Mac Catalyst
I'm taking an iPhone app and making it available for Mac.When I run the app on the Mac, the UIPicker displays nothing.It places the cursor inside of the button and allows me to type, which is not the...
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 ArticleReloading Particular Row of PickerView in swift
I have a pickerView consisting of a label and image. i'm updating that image when pickerview is tapped on that particular. but to show the change of image i have to reload pickerView. and when i reload...
View ArticleSwapping through UITextFields constraint issue
I have an EditProfileViewController, with a tableview and textfields. In one of the textfields I have a pickerView as inputView and a toolBar in the inputAccessoryView. When the view loads and I select...
View ArticleHow to set color and text/font size of picker text?
I use a specific picker setup to mimic the action of a drop down list in Xamarin.iOS. The code is: public void ConfigureSelectPicker(UITextField pickerTextField, List<string> theData) {...
View ArticleSwiftUI: Setting Picker line height
For large fonts, the lines in a Picker are overlapping. How do I change the Picker's line height? (Hint: the .lineSpacing modifier doesn't do it.)See AlsoThis question is similar to that of Ejaaz, but...
View ArticleFormatting picker titles and columns in groups
I cannot find a way to create a picker where the components are grouped and aligned with titles. My picker needs to allow multiple types of information to be selected, some of it is composite numbers...
View ArticleHow do I get a list of countries in Swift ios?
I've already seen two similar questions to mine, but the answers for those questions do not work for me. I have an old project with a list of countries manually typed out inside a set of square...
View ArticleCustomized UIPickerView and components
How can I create a multi select picker? I've a list of items and I want them to show in a picker with the option to multi select them, with checkmarks.I've seen this while using an app, can somebody...
View ArticleSwiftUI Alert with Picker
I'm trying to create a SwiftUI alert dialog that contains a picker view inside of it, similar to the example here https://github.com/zhiyao92/PickerView-on-AlertController.This is the code I've built...
View Articlehow to have "hour", "minute", "second" text behind UIPickView
I'm making an app with a countdown timer feature.I want to show UIPickView like this.enter image description hereAnd this is my app enter image description hereI tried using UIDatePicker but it doesn't...
View ArticleUIPickerView won't scroll on a custom UIView
I've got a custom class that conforms to UIView. It contains a UIPickerView and UIButton. I'm using the following code:class ColorPickerView: UIView { // MARK: - Subviews private lazy var colorPicker:...
View ArticleUIPickerView automatic dimensions
For dynamic row heights in UITableView Swift hasUITableViewAutomaticDimensionIs there an equivalent for UIPickerView
View ArticleHow to show selected JSON data in the pickerview?
I have a 2 textviews and 2 pickerviews. I want the user to select the city and district of that city. When I select the city I want to list the districts of that city in the pickerview. I don't use...
View ArticleRemoving UIPickerView Blue Highlight
For some time now I've been trying to remove the blue highlight in UIPickerView when you're using the pickerView:viewForRow:forComponent:reusingView: delegate.I'm sure many here have been there and...
View ArticlePicker selection mismatch with decoded Json river data
I am building a swift application and am trying to have a selection of options in a menu picker for different rivers. Currently, the issue I am having is that when selecting a different river for the...
View ArticleHow can I save several UISwitches and thus display different arrays of a...
I am in the process of programming a small app to calculate exposure times.I have a UiViewController to set the apertures of one Stop, halfStop and thridStop via three UiSwitches.If you set one...
View ArticleSwift Picker Containing A View Not Showing The Color component
So I want to have a dropdown containing different categories and each category should have a color, the string value of the category should be binded to my viewmodel.category.This is what I...
View ArticleHow do I make a UIPickerView rise from the bottom of the app after pressing a...
I'm learning Swift by making an iPhone app. The problem I'm running into involves implementing a UIPickerView. I have a button that should, if pressed, make a UIPickerView ascend from the bottom of the...
View ArticleWhat is the difference between UIPickerViewDataSource and UIPickerViewModel...
When it comes down to UIPickerView, I've always used a UIPickerViewDataSource to fill my picker view with data. Recently I've found out that there is also an option to use a UIPickerViewModel, but I...
View ArticleDisable text editing when input view is set for text field
How to disable editing textField manually. I have UIPickerView that I want to use as inputView. But seems I still have ability to copy paste in textfield.I found this question and seems that's what I...
View ArticleHow to set background color of UIPickerView using UIAppearance?
I am using the following line of code to change the background color of UIPickerView throughout my app as it is for a theme in the app. This changes nothing. [[UIPickerView appearance]...
View ArticleUIPickerView best practice?
One short question: on a registration process I would like to ask the user to choose a value from a list of values.Is it the right way to use a view Controller adding there all text fields and for the...
View Article