Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where is the combobox object in interface builder?

Tags:

xcode

ios

xcode5

I just updated to Xcode 5.0.2 and in interface builder on the lower right corner where I can drag and drop objects I don't see combobox any more. I tried using the search field below and typed combobox, NSCombobox, but nothing.

like image 486
jedimariachi Avatar asked Feb 20 '26 09:02

jedimariachi


2 Answers

Using a UIPickerView will probably get you far

like image 74
Wilmar Avatar answered Feb 22 '26 23:02

Wilmar


It's easy to make a ComboBox lookalike. It consists of only three parts in InterfaceBuilder xib:

  1. A Label for holding the selected choice. I've made it with a white background to look like an input field.
  2. A graphic Button with an arrow
  3. A ListView

The ListView is normally invisible (setHidden:TRUE) and is placed over other items in this xib. A tap on the Button makes the ListView visible (setHidden:FALSE). At selection, didSelectRowAtIndexPath writes the selected string to the label and set ListView hidden.

enter image description here

like image 28
thpitsch Avatar answered Feb 23 '26 00:02

thpitsch