Wednesday, 4 September 2013

How to make a field edited by a temporal UIPickerView

How to make a field edited by a temporal UIPickerView

Disclaimer: I'm pretty early on the learning curve of iOS apps. I've done
6 or 7 SingleView app tutorials. And am now doing my own "real" app
(currently SingleView).
At the top of my app (an inventory gathering app) I currently have a
simple UITextField, with pretty much standard keyboard editing, which is
where I place a device serial id. The constraints on the serial number are
[ABDEF][0-9A-F]*3[0-9]*2. I wrote a simple separate play app which
convinced me that a 6 column UIPickerView would be the way to go for this.
So what I want is some sort of widget that displays the 6 digit serial,
and when touched, slides up my UIPicker to tune it.
I'm looking for any pointers in how to go about this. Some questions that
occur immediately to me:
1) Is a UITextField the best widget still? Can I make it bring up my
picker thing instead of a keyboard easily? Or should I be using a label
and somehow attaching touch to it? Or a borderless button? 2) Do I want to
use an ActionSheet? I saw some posts about that, but there were some
comments that indicated that might be the wrong tool for the job.

No comments:

Post a Comment