Questions tagged [uipickerview]

The UIPickerView class implements objects, called picker views, that use a spinning-wheel or slot-machine metaphor to show one or more sets of values. Appears on iOS.

UIPickerView is part of the UIKit Framework and is available in iOS 2.0 and later. The UIPickerView class implements objects, called picker views, that use a spinning-wheel or slot-machine metaphor to show one or more sets of values.

Picker views can have multiple components, each of which can select independent values.

References:

3356 questions
16
votes
6 answers

How to set the background color of UIPickerView on iOS 7 using SDK 7?

How to set the background color of UIPickerView on iOS 7 using SDK 7 and use a standard picker on iOS 5 and 6? It's transparent by default on iOS 7.
Dmitry
  • 14,306
  • 23
  • 105
  • 189
16
votes
5 answers

UIPickerView select first row programmatically

There are a lot of questions like this, but I believe my case is unique. I have a pickerview that pops up when a textbox is clicked inside. The user selects their location in the pickerview, and it's put into the textbox. When opening the…
Jonesopolis
  • 25,034
  • 12
  • 68
  • 112
16
votes
3 answers

How would I set up a UIPickerView?

I am setting up a UIPickerView to have choices like choice a, choice b, choice c and so on. I have tried to interpret the sample code from Apple but that seems very difficult to understand for a beginner like me. I also would like the choices from…
Nikita Jerschow
  • 836
  • 2
  • 11
  • 24
15
votes
3 answers

UIPIckerView in UIPopoverController

I'm not trying to resize the PickerView's height. I'm fine with having the default size, which I believe is 320 x 216. I created this code to present a pickerView in my popovercontroller, however, I get these messages on the console: 2 011-06-30…
Crystal
  • 28,460
  • 62
  • 219
  • 393
15
votes
2 answers

Changing UIPickerView row height

I'm working on a program for a class I'm taking and part of the program requires a UIPickerView with images in it. I have the picker up and running, but the height of the rows in the picker are still too small, causing the images (100x100) to…
Paul Woidke
  • 928
  • 4
  • 18
  • 40
15
votes
3 answers

UiPickerView with custom fixed label and autolayout

I need to implement a UIPickerView to choose hours, minutes and seconds. I need to have a label, next to each component that stay fixed when the picker spin. For example you can look at the timer section of the Apple Clock app. I put an image for…
Luca
  • 1,704
  • 3
  • 29
  • 42
15
votes
5 answers

Terminating app due to uncaught exception 'UIViewControllerHierarchyInconsistency',

I created a toolbar above the picker with two buttons and worked on ios7, when i run in ios8 crash: Terminating app two to uncaught exception 'UIViewControllerHierarchyInconsistency', reason: 'child view controller: Should Have parent view…
Marco Giraudo
  • 153
  • 1
  • 1
  • 5
15
votes
4 answers

A simple UIPickerView in MonoTouch (Xamarin)?

Can anybody describe how I can create a UIPickerView in monotouch using XCode and populate it with sample data? I did look at the example here:…
P. Sami
  • 2,115
  • 2
  • 21
  • 39
15
votes
1 answer

Bringing up a UIPickerview rather than keyboard input iOS

Basically I would like to have the user click in the text field and it bring up a populated pickerview rather than a keyboard. This would also need a toolbar with a done button as well Im presuming. I currently have the field set as an output and…
JohnV
  • 285
  • 1
  • 3
  • 13
15
votes
2 answers

How do I rewrite the UIDatePicker component?

I've noticed that the UIDatePicker doesn't work with NSHebrewCalendar in iOS 5.0 or 5.1. I've decided to try and write my own. I'm confused as to how to populate the data and how to maintain the labels for the dates in a sane and memory efficient…
Moshe
  • 57,511
  • 78
  • 272
  • 425
14
votes
3 answers

Does UIPickerView's selectRow:inComponent:animated: call pickerView:didSelectRow:inComponent:?

Does UIPickerView's selectRow:inComponent:animated: call pickerView:didSelectRow:inComponent:? Otherwise, can I just call it myself? Thanks
joshim5
  • 2,292
  • 4
  • 28
  • 40
14
votes
1 answer

SwiftUI Picker with Enum Source Is Not Enabled

I'm trying to understand the new SwiftUI picker style, especially with data from a source other than an array. I have built a picker with an enum. I first made a simple app with only the picker and associated enum. This works as expected. Strangely,…
JohnSF
  • 3,736
  • 3
  • 36
  • 72
14
votes
5 answers

How can I get images to appear in UI PickerView Component in Swift?

I am trying to use images in a Swift PickerView. I don't know how to get the images to actually appear in the component. I know how to do this using Strings with the titleForRow function but I don't know how to do this using images. Here is my…
Susan Starkman
  • 163
  • 1
  • 1
  • 7
14
votes
2 answers

Elegantly replace iPhone keyboard with UIPickerView

I have a table view that has embedded UITextFields for entering some data. It also has two other fields that popup a UIPickerView and a UIDatePicker - as demonstrated in the DateCell example from Apple. Mostly it works but I can't figure out how to…
Brad Robinson
  • 44,114
  • 19
  • 59
  • 88
13
votes
4 answers

Convert NSString to double for calculations and then back again to print in NSString

I accept NSString as NSString *value = [valuelist objectAtIndex:valuerow]; NSString *value2 = [valuelist2 objectAtIndex:valuerow2]; from UIPickerView. I want to double *cal = value + (value2 * 8) + 3; NSString *message =[[NSString alloc]…
Omkar Jadhav
  • 1,046
  • 3
  • 16
  • 41