• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2757
  • Last Modified:

Combo box implementation in iphone

The combo box control is not available in the iPhone sdk. What is the best way to simulate the combo box behavior in the IPhone. We need to have 6 combo boxes in our application on one screen. So, I need to create the 150 x 300pixels combo boxes. I tried the UIPicker view controls and customized the m to 150x300.  The look and feel of this is horrible.
0
shore-support
Asked:
shore-support
  • 2
1 Solution
 
roeibCommented:
In a view controller you have a UITextField and a UITableView. Assign the view controller to be the delegate of the both controls, plus the data source of the table.

Implement the UITextField delegate method textField:shouldChangeCharactersInRange:replacementString: in your controller. This intercepts the changes as they are being typed in your text field. In this method, iterate through your list of possible options and store the matches in an NSMutableArray instance variable on your view controller. Then call [myTableView reloadData].

Have your table cells generated from the array of matches you previously stored.

It should be pretty straightforward and shouldn't take much code at all beyond a few delegate methods to get working.

but insted i can recommend you to use this Toolkit :

http://www.devdirect.com/all/tmssmoothcontrolspack_PROD_00022102.aspx
0
 
shore-supportAuthor Commented:
How to add a nice borders to the UITable view?
0
 
shore-supportAuthor Commented:
I am able to come up with the solution by following the approach specified.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: MCSA MCSE Windows Server 2012

This course teaches how to install and configure Windows Server 2012 R2.  It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now