Mixed UIPicker & TextField in TableView

I've setup a TableView with 4 UITextFields that I want the user to be able to input some information into. 2 of the text fields when pressed need to present a UIPickerView to select an option, instead of the keyboard. Each PickerView needs to display a separate array of items.

Does anyone know how I can accomplish this? This is the closest i've come to finding a solution:

How to use one UIPickerView for multiple textfields in one view?

I can get the Picker to show up correctly but only show an one array and every text field in the cell shows the same picker.

Answers


I love this answer, which is why I link to it when I can:

http://stackoverflow.com/a/8583703/220820

You could fill your picker with data whenever a text field becomes first responder for its inputView (its keyboard replacement).


Andreas's answer is better or you could do present UIPickers embedded in UIActionSheets from the bottom and after selection, you could use the picker's delegate method to set the TextField text.


Need Your Help

Composite table with Hibernate Envers

java hibernate jpa hibernate-envers

I have an application with a composite table holding one extra column. It all works fine, until we add Hibernate Envers (@Audited).

Wrong ByteArray Returned From SequenceFileRecordReader

hadoop apache-pig hdfs user-defined-functions

I am trying to read binary network packet data stored in a HDFS SequenceFile. Problem seems to be with the non-printable characters, or in the packet header.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.