How to programmatically create an NSComboBox - ios

i have a view. how do i create a NSComboBox programmatically

ComboBox like Mac OS X is not possible in iOS X.
You can do a workaround. Use the image as backgroud(like combobox background) and user other controls on it like textfield, buttons etc.

Related

options control in ios (Swift)

I would like to show options to choose in my View. I did not found a control for that. Any suggestion howto do that ?
You must use 3 different buttons for the check box,now set different tag for the buttons and set default and selected image for the button.

Xcode buttons/images always on top?

Is there an option for a button/image to set, that it will always be shown on top? So I have 2 buttons and want to add an image. But the image covers the two buttons and I have no idea how I could get the image in the background or the buttons in the front.
BTW: I´m fairly new to xcode and programming...
Use the xCode top menu item Editor->Arrange. There you have options to handle z index for controls.
What I did was, to have two button one for the label and one for the image and when one is clicked it propagates the message to the other and does the action depending on which one was clicked.

What is the iOS7 equivalent to HTML radio buttons?

I want the user to select his gender. Is there an iOS7 equivalent to HTML radio buttons?
I find the iOS switch awkward for gender selection and a picker view overkill...
iOS segmented buttons can help you:
https://developer.apple.com/library/ios/documentation/uikit/reference/UISegmentedControl_Class/Reference/UISegmentedControl.html
Or a custom one:
https://www.cocoacontrols.com/controls/segmented-buttons
There is no default class to create feature like HTML radio button. But you can customize with button by showing images depends on click(On/Off).

Where is the combobox object in interface builder?

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.
Using a UIPickerView will probably get you far
It's easy to make a ComboBox lookalike. It consists of only three parts in InterfaceBuilder xib:
A Label for holding the selected choice. I've made it with a white background to look like an input field.
A graphic Button with an arrow
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.
Combo boxes are available only for Mac projects, not iOS projects, so you're getting the expected behavior. If you create a Cocoa application project and type combo in the object library's search field, the combo box and combo box cell objects should appear in the object library.
I'm surprised you were able to access a combo box in earlier versions of Xcode. I don't remember combo boxes ever being available in iOS projects.
I also needed a HTML select-like control (single-selection dropdown list) without breaking the XCode legacy GUI interface across past and future iOS releases.
I ended up coding DownPicker, a lightweight control which does just that combining UITextField and UIPickerView. It can be used either as custom control (UIDownPicker) or also as control wrapper, upgrading any existing UITextField.
Here's how it looks like:
For more info and download you can check this brief tutorial or the GitHub project page (both made by me - the project is open-source).

Popover/Tooltip with buttons like in iOS autocorrect

How can I create a tooltip like this in my iPad app? Is this an UIPopoverController? Or some kind of custom tooltip view?
Use UIMenuController. There's menuItems property to set custom items.
https://developer.apple.com/library/ios/DOCUMENTATION/iPhone/Reference/UIMenuController_Class/UIMenuController.html

Resources