This Old App: Why I Hate PickerViews, but Learned To Love Them.

A few months ago, Apple removed my app Interval RunCalc from the App Store for being too old. In this series of articles I’ll document what I did on rebuilding and improving the app. In the last installment, I placed my new model into the old app, fixed a lot of errors from taking 2013 Objective-C code in 2017’s Xcode and make a quick, temporary view and controller to test it. Next, I’ll replace text fields I used for input. My best choice for this bothers me. UIPickerView is one of my biggest love/hate relationship in all of iOS development.

The app from my last installment looks something like this:

While this is okay for testing the model, it is not something I’d want for users. There’s a principle I’d like to introduce: Get Good, Get Fast. When working with user interfaces, get the data from your user as quickly as possible. The more time it takes a user to input data, the less likely he or she will use the app. They will get frustrated. What they enter must be good data. Data must makes sense to the application. We refer to this as valid data.

The current user interface is fast since I can type on the keyboard, but fails miserably in the validation arena. Because I’m using a keyboard and my values from the keyboard are strings, there’s a lot of data validation code I need to be sure I’m getting good data from the user.

In the version 1.0 of Interval RunCalc, I used keyboards. I tried controlling data validation by breaking up numbers into parts. For example, time used a special controller that broke up time into three integers were easier to input but restricted themselves to certain values

I did this for HH:MM:SS, MM:SS and decimal values. Problem was I had those values everywhere in the application, so my storyboard ended up a huge mess of segues.

My rationale at the time was simple: I didn’t want to use a UIPickerView for input. I hated UIPickerViews. There’s two reasons I hate them. Picker views break the Get Fast Get Good principle on the get fast side. They are effective for no more than ideally ten to twenty items. The classic picker view was one like this with 100 components.

It takes forever to get to higher numbers, breaking get fast. I get frustrated with these in other apps, and did not want to subject my users to such a thing.

The other objection separates new developers from seasoned ones. New developers, upon learning about picker views want to abuse them. They’ll put everything in picker views, and several on the same view. They’ll throw insane amounts of data in the most confusing ways, often making the UI unusable. For example here’s six components and two picker views. You can only read it in landscape

This would take forever to input data and gets very confusing fast. I get more weird questions about bizarre uses for picker views than any other control. Most of these developers do not think like users. Users hate picker views because they are confusing and take forever to use.

There is one strength for UIPickerView: Validation. UIPickerViews constrain input. Apple uses this for the date picker, taking four elements and combining them to get a Date value.

This is how picker views are supposed to be used. But even here I hate anything over 20 rows, like the date.

The date picker gives us the clue of how to use them right: Separate components into discrete elements than can have only constrained values. Make those elements with as few elements as possible. I set a limit of twenty rows. The keyboard input was a horrible mess in version 1.0. It never worked right. Despite my objections to them, I decided to use a picker view for my input to avoid all the data validation. I want one class of UIPickerView controllers. It will adapt to the different scenarios I need: HH:MM:SS, HH:MM:SS, and two digit decimal. I’ll make this a modal view instead of the navigation view I used in the original application to get rid of all those segues. I wrote my storyboard for it, which I placed on my Main.Storyboard:

This looks like a navigation controller, but it is an independent view controller on my storyboard, which will be a modal controller. I set a storyboardID of InputController. I made an illusion of a toolbar from two buttons, a label, and a UIView behind them, arranged with some auto layout.

This is a very flexible input system, giving the user the units I’m using and giving me power over all the buttons and labels. I’ll make a view controller PickerViewController for it, and I’ll add the following outlets and actions to that view controller:

@IBOutlet weak var backButton: UIButton!
@IBOutlet weak var doneButton: UIButton!
@IBOutlet weak var titleLabel: UILabel!
@IBOutlet weak var toolBar: UIView!
@IBOutlet weak var unitsOfMeasureLabel: UILabel!
@IBOutlet weak var picker: UIPickerView!

@IBAction func didPressDone<span class="hljs-params">(_ sender: UIButton) {

}

@IBAction func didPressBack<span class="hljs-params">(_ sender: UIButton) {

}


Adding the Picker View 

In this article I’m more interested in the application than the implementation of a picker view. I’ll be leaving out steps. If you need to understand picker views and picker components, I’ve written out the whole process in detail which you can find here. I’ll be making a variation of that code, but understanding the way I did that will help you here.

My picker view is based on digits. No component will have more than 10 rows, speeding up the input process. Looking at the types of components I have:

  • Decimal digit – values of 0,1,2,3,4,5,6,7,8,9
  • Tens of minutes and seconds – values of 0,1,2,3,4,5
  • Time separator – a colon(:)
  • Decimal separator – a period(.)

I could add constants for this to my code, making four types of component wheels to add to my code and making some string arrays to do this.

let decimalDigit = ["0","1","2","3","4","5","6","7","8","9"]
let timeDigit = ["0","1","2","3","4","5"]
let timeSeperator = [":"]
let decimalSeperator = ["."]

That’s what I did in the article I mentioned above. There is another way to do this based on the row number and a bit of control logic. Instead of constants, I’ll use an enumeration.

enum ComponentType {

&nbsp;&nbsp;&nbsp;&nbsp;case ten,six,colon,decimal

&nbsp;&nbsp;}

I’ll make an array of this enum.

private var components = [ComponentType]()

This way I can describe any set of wheels quickly. MM:SS is [.six,.ten,.colon,.six.ten].The number of components are the size of this array

func numberOfComponents(in pickerView: UIPickerView) -&gt; Int {

&nbsp;&nbsp;&nbsp;&nbsp;return components.count

&nbsp;&nbsp;}

For HH:MM, this would return 5. I’ll set the number of components in my datasource, based on the component type:

func pickerView(_ pickerView: UIPickerView, numberOfRowsInComponent component: Int) -> Int {
    switch components[component]{
        case .ten: return 10
&nbsp;&nbsp;&nbsp;&nbsp;    case .six: return 6
&nbsp;&nbsp;&nbsp;&nbsp;    case .colon,.decimal: return 1
&nbsp;&nbsp;  }
}

Since I’m not using a string array to give me the title for a row in a component, I use the row number. The digit I want to display is equal to its row number. Make a formatted string of the row number. The exceptions are colons and decimal points, which I’ll explicitly return. I display the correct digit like this:

func pickerView(_ pickerView: UIPickerView, titleForRow row: Int, forComponent component: Int) -> String? {
&nbsp;&nbsp;&nbsp;&nbsp;switch components[component]{
&nbsp;&nbsp;&nbsp;&nbsp;    case .ten: return String(format: "%01i", row)
    &nbsp;&nbsp;&nbsp;&nbsp;case .six: return String(format: "%01i", row)
    &nbsp;&nbsp;&nbsp;&nbsp;case .colon: return ":"
    &nbsp;&nbsp;&nbsp;&nbsp;case .decimal: return "."
&nbsp;&nbsp;&nbsp;&nbsp;}
&nbsp;&nbsp;}&nbsp;&nbsp;

This all depends on the correct values in the components array. I’ll add another enum, listing input formats. I have three formats for that enumeration: a double with two dight decimal, MM:SS and HH:MM:SS.

enum PickerType {

&nbsp;&nbsp;&nbsp;&nbsp;case twoDecimal,minuteSecond,hourMinuteSecond

&nbsp;&nbsp;}

I’ll write a function to set the components.

&nbsp;func setPickerComponents(for pickerType:PickerType){
&nbsp;&nbsp;&nbsp;&nbsp;self.pickerType = pickerType

&nbsp;&nbsp;&nbsp;&nbsp;switch pickerType{
&nbsp;&nbsp;&nbsp;&nbsp;    case .twoDecimal:<span class="hljs-comment">//999.99 max value
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     components = [.ten,.ten,.ten,.decimal,.ten,.ten]&nbsp;&nbsp;&nbsp;&nbsp;
        case .minuteSecond: <span class="hljs-comment">//59:59 max value
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     components = [.six,.ten,.colon,.six,.ten]
&nbsp;&nbsp;&nbsp;&nbsp;    case .hourMinuteSecond: <span class="hljs-comment">//99:59:59 max value
     &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;components = [.ten,.ten,.colon,.six,.ten,.colon,.six,.ten] &nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;}

&nbsp;&nbsp;}

The class has two data properties. When I present the view controller, I’ll set these two properties.

var units = Units.meters

&nbsp;var value = 0.0&nbsp;&nbsp;

One is the units of measure and the current value. Units is another enumeration which lists all the app’s units of measure:

enum Units {
&nbsp;&nbsp;&nbsp;&nbsp;case 
       meters,kilometers,miles,
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;milesPerHour,minutesSecondsPerMile,kilometersPerHour,
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;hoursMinutesSecond
&nbsp;&nbsp;}

There’s a lot of cosmetic changes I’ll make depending on the units, such as displaying the units and if this is a speed, distance or time variable. I wrote a method configure to handle all this, leaving some methods to do a lot of the repetitive configuration.

func configure<(for units:Units){

&nbsp;&nbsp;&nbsp;&nbsp;switch units{
&nbsp;&nbsp;&nbsp;&nbsp;case Units.meters:
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;setTwoDecimal()
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;unitsOfMeasureLabel.text = "Meters"
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;distance()
&nbsp;&nbsp;&nbsp;&nbsp;case Units.kilometers:
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;setTwoDecimal()
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;unitsOfMeasureLabel.text = "Kilometers"
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;distance()
&nbsp;&nbsp;&nbsp;&nbsp;case Units.miles:
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;setTwoDecimal()
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;unitsOfMeasureLabel.text = "Miles"
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;distance()
&nbsp;&nbsp;&nbsp;&nbsp;case Units.milesPerHour:
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;setTwoDecimal()
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;unitsOfMeasureLabel.text = "Miles per Hour"
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;paceOrSpeed()
&nbsp;&nbsp;&nbsp;&nbsp;case Units.minutesSecondsPerMile:
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;setMinutesSeconds()
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;unitsOfMeasureLabel.text = "Minutes per Mile"
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;paceOrSpeed()
&nbsp;&nbsp;&nbsp;&nbsp;case Units.kilometersPerHour:
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;setTwoDecimal()
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;unitsOfMeasureLabel.text = "Kilometers per Hour "
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;paceOrSpeed()
&nbsp;&nbsp;&nbsp;&nbsp;case Units.hoursMinutesSecond:
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;setHoursMinutesSeconds()
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;unitsOfMeasureLabel.text = "Time"
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;time()
&nbsp;&nbsp;&nbsp;&nbsp;}
&nbsp;&nbsp;}

I’ll add three methods for configuring the types.

func setTwoDecimal<span class="hljs-params">(){
&nbsp;&nbsp;setPickerComponents(for: .twoDecimal)
}

func setHoursMinutesSeconds<span class="hljs-params">(){
&nbsp;&nbsp;setPickerComponents(for: .hourMinuteSecond)&nbsp;&nbsp;
} &nbsp;

func setMinutesSeconds<span class="hljs-params">(){
&nbsp;&nbsp;setPickerComponents(for: .minuteSecond)
}


For the user interface side of things, I set the background color and title depending on the units so users have visual cues:

func distance(){
&nbsp;&nbsp;&nbsp;&nbsp;titleLabel.text = "Distance"
&nbsp;&nbsp;&nbsp;&nbsp;backgroundColor = UIColor.cyan
&nbsp;&nbsp;}

&nbsp;&nbsp;func paceOrSpeed(){
&nbsp;&nbsp;&nbsp;&nbsp;titleLabel.text = "Pace / Speed"
&nbsp;&nbsp;&nbsp;&nbsp;backgroundColor = UIColor.yellow
&nbsp;&nbsp;}

&nbsp;&nbsp;func time(){
&nbsp;&nbsp;&nbsp;&nbsp;titleLabel.text = "Time"
&nbsp;&nbsp;&nbsp;&nbsp;backgroundColor = UIColor.green
&nbsp;&nbsp;}&nbsp;&nbsp;

The First Test

I have enough code to test the picker now. I’ll set up a button on my test storyboard and add some code to configure the picker. I’ll add a button Picker.

I’ll make an action for this button in RootViewController.swift. This input controller is intended for modal controllers. Modals launching for a storyboard identifier makes sense in this context. I use it multiple times. It clears all that segue spaghetti I had in version 1.0. I’ll launch the controller in a modal view using the default values.

@IBAction func pickerButton<span class="hljs-params">(_ sender: UIButton) {
&nbsp;&nbsp;&nbsp;&nbsp;let vc = storyboard?.instantiateViewController(withIdentifier: "InputController") as! PickerViewController
&nbsp;&nbsp;&nbsp;&nbsp;present(vc, animated: <span class="hljs-literal">true, completion: <span class="hljs-literal">nil)
&nbsp;&nbsp;}

I’ll go back to the PickerViewController.swift file and add dismissal code in my actions.

@IBAction func didPressDone(_ sender: UIButton) {
&nbsp;&nbsp;&nbsp;&nbsp;self.dismiss(animated: true, completion: nil)
&nbsp;&nbsp;}

@IBAction func didPressBack(_ sender: UIButton) {
&nbsp;&nbsp;&nbsp;&nbsp;self.dismiss(animated: true, completion: nil)
&nbsp;&nbsp;}

One thing I forgot – to call configure. I’ll do that on the viewDidLoad of PickerViewController.swift

override func viewDidLoad() {
&nbsp;&nbsp;&nbsp;&nbsp;super.viewDidLoad()
&nbsp;&nbsp;&nbsp;&nbsp;picker.dataSource = self
&nbsp;&nbsp;&nbsp;&nbsp;picker.delegate = self
&nbsp;&nbsp;&nbsp;&nbsp;configure(for: self.units)
&nbsp;&nbsp;}

I’m ready to run. When I build and run, then press the picker button, I get a beautiful interface, where I can roll the individual digits.

I notice a potential bug. I ran a quarter of a marathon or 10.56 Km last weekend. That’s 10557.30 meters, which I could not enter into the app since I don’t have enough digits. I could add another two digits for 99999.99 for meters, but before I do, I’ll ask myself the question: will the user enter anything in meters?

This app is for distance runners. Distances are in kilometers or miles, never meters. That would be a change that has no use. I only care about what the user wants here, not my internal measurement system of meters. I’ll skip that change.

I do another test. I add the unit of measure in the action in RootViewController for a pace.

@IBAction func pickerButton(_ sender: UIButton) {
&nbsp;&nbsp;&nbsp;&nbsp;let vc = storyboard?.instantiateViewController(withIdentifier: "InputController") as! PickerViewController
&nbsp;&nbsp;&nbsp;&nbsp;vc.units = .minutesSecondsPerMile
&nbsp;&nbsp;&nbsp;&nbsp;present(vc, animated: true, completion: >nil)
&nbsp;&nbsp;}

Building and running again, I can spin the wheels there too.

Setting Values

I want to set the picker to an initial value. Inside the picker’s code I‘ll change value to a series of row indices representing the number, one digit per component. I’ll convert value to a string, then use the characters to represent rows.

If I had a 11:23 minute/mile setting, I set the string to "11:23" The code looks at a character from the left to the right as the row index for the component. The functions Int(String(character)) get me this index used in a for loop. I use the selectRow method to select the row with that number.

picker.selectRow(row, inComponent: component, animated: animated)

The Int constructor produces a nil value for any character that isn’t a digit. Those are my separators, and they always have a row value of 0. The code looks like this:

func setComponentValues(from str:String){&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;var component = 0
&nbsp;&nbsp;&nbsp;&nbsp;for character in str.characters{
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if let row = Int(String(character)){
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;picker.selectRow(row, inComponent: component, animated: animated)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} else {
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;picker.selectRow(0, inComponent: component, animated: animated)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;component += 1
&nbsp;&nbsp;&nbsp;&nbsp;}
&nbsp;&nbsp;}

I made three functions to set the value depending on the PickerType. If their sparse code didn’t make sense before, they will now. Each converts the value to a string for that PickerType, then converts that string to the correct rows in the picker components

func setTwoDecimal(){
&nbsp;&nbsp;&nbsp;&nbsp;setPickerComponents(for: .twoDecimal)
&nbsp;&nbsp;&nbsp;&nbsp;let str = String(format:"%06.2f",value)
&nbsp;&nbsp;&nbsp;&nbsp;setComponentValues(from: str)
&nbsp;&nbsp;}

&nbsp;&nbsp;func setHoursMinutesSeconds(){
&nbsp;&nbsp;&nbsp;&nbsp;setPickerComponents(for: .hourMinuteSecond)
&nbsp;&nbsp;&nbsp;&nbsp;let hours = Int(value + 0.5) / 3600
&nbsp;&nbsp;&nbsp;&nbsp;let hoursRemainder = Int(value + 0.5) % 3600
&nbsp;&nbsp;&nbsp;&nbsp;let minutes = hoursRemainder / 60
&nbsp;&nbsp;&nbsp;&nbsp;let seconds = hoursRemainder % 60
&nbsp;&nbsp;&nbsp;&nbsp;let str =&nbsp;String(format:"%02i:%02i:%02i",hours,minutes,seconds)
&nbsp;&nbsp;&nbsp;&nbsp;setComponentValues(from: str)
&nbsp;&nbsp;}

&nbsp;&nbsp;func setMinutesSeconds(){
&nbsp;&nbsp;&nbsp;&nbsp;setPickerComponents(for: .minuteSecond)
&nbsp;&nbsp;&nbsp;&nbsp;let minutes = Int(value) / 60
&nbsp;&nbsp;&nbsp;&nbsp;let seconds = Int(value) % 60
&nbsp;&nbsp;&nbsp;&nbsp;let str = String(format:"%02i:%02i",minutes,seconds)
&nbsp;&nbsp;&nbsp;&nbsp;setComponentValues(from: str)
&nbsp;&nbsp;}

&nbsp;&nbsp;

To save myself some time I copied and pasted some code from my model to make the time strings.

In RootViewController, Add a value to the action:

@IBAction func pickerButton(_ sender: UIButton) {
&nbsp;&nbsp;&nbsp;&nbsp;let vc = storyboard?.instantiateViewController(withIdentifier: "InputController") as! PickerViewController
&nbsp;&nbsp;&nbsp;&nbsp;vc.units = .minutesSecondsPerMile
&nbsp;&nbsp;&nbsp;&nbsp;vc.units = 683.0 // in seconds 600 + 60 + 20 + 3 = 11min 23sec
&nbsp;&nbsp;&nbsp;&nbsp;present(vc, animated: <span class="hljs-literal">true, completion: <span class="hljs-literal">nil)
&nbsp;&nbsp;}

I’ll test this and see 11:23

Getting Values

The purpose of a input picker is the get a value from the user. To do that I’ll update value every time the picker changes. I’ll set up the picker’s delegate function to update the value in a function

&nbsp;func pickerView<span class="hljs-params">(_ pickerView: UIPickerView, didSelectRow row: Int, inComponent component: Int) {
&nbsp;&nbsp;&nbsp;&nbsp;updatePickerValue()
&nbsp;&nbsp;&nbsp;&nbsp;titleLabel.text = "<span class="hljs-subst">\(value)" //for testing only
&nbsp;&nbsp;}

I added a extra line for testing the value, sending the value to the title. In the app we’ll use a delegate, but that’s for the next phase, so I’ll display it here for now.

The the updatePickerValue function converts the components into a value. I built this into another switch pickerType control structure. This is the opposite of the setting the value. Take the row and convert it to a value. If it is part of a bigger number, add it with the other digits of the number. For example, for the .twoDecimal, I did this:

case .twoDecimal:
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;picker.selectedRow(inComponent: 5)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;let hundredth = Double(picker.selectedRow(inComponent: 5))
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;let tenth = Double(picker.selectedRow(inComponent: 4))
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;let fraction = tenth * 0.1 + hundredth * 0.01
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;let ones = Double(picker.selectedRow(inComponent: 2))
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;let tens = Double(picker.selectedRow(inComponent: 1))
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;let hundreds = Double(picker.selectedRow(inComponent: 0))
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;let wholeNumber = hundreds * 100 + tens * 10 + ones
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;value = wholeNumber + fraction

I did this explicitly since it is easier to debug than an algorithm for it. I do the same for the time-based picker types, grabbing a digit and adding it all together.

&nbsp;case .minuteSecond: //00:00 returning seconds
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var tens = Double(picker.selectedRow(inComponent: 0))
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var ones = Double(picker.selectedRow(inComponent: 1))
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;let minutes = (tens * 10 + ones) * 60
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tens = Double(picker.selectedRow(inComponent: 3))
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ones = Double(picker.selectedRow(inComponent: 4))
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;let seconds = (tens * 10 + ones)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;value = minutes + seconds&nbsp;&nbsp;&nbsp;

Run again and I’ll change the pace to 10:23. As expected, 623.0 is in the title.

 

I’ve built a decent picker that follows Get Good, Get Fast. All data in and out of the picker is a single value of double. What that value represents is a unit of measure. My unit of measure configures my picker for the only legitimate values. I call the picker from a modal view programmatically without a lot of confusion in the storyboard. My next step is the user interface, and hooking this up to it. In the next installment, I’ll build that UI and find I made a few bad assumptions with the picker and find some other interesting dilemmas.

One thought on “This Old App: Why I Hate PickerViews, but Learned To Love Them.”

  1. Hi Steve! I’m embarrassed to say that I’m so very behind in reading your posts. I’m trying to get myself back into app development. I have a lot of catching up to do! I really enjoying when you walk us through the different steps you take.

    Thanks for everything!
    Stef

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s