Combo box implementation in iphone

Posted on 2009-12-27
Last Modified: 2012-05-08
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.
Question by:shore-support
    LVL 3

    Accepted Solution

    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 :

    Author Comment

    How to add a nice borders to the UITable view?

    Author Closing Comment

    I am able to come up with the solution by following the approach specified.

    Featured Post

    Highfive Gives IT Their Time Back

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    Preface   In the first 100 days of the Macintosh release in January 1984, Apple sold 72,000 of the computers. Relatively cheap, easy-to-use personal computer with a graphical operating system. I've never seen this model. I did see this one:   …
    CocoaPods is the best way to manage library dependencies in iOS and OS X projects. By using cocoa pods there is no need of downloading the code from github and copying to your project. There are plenty of open source libraries now available with C…
    Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

    746 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now