how to make radio button and checkbox button in iphone? - iphone

Can anybody tell me the code to make radio button and checkbox button in iphone.
Thanks in advance.

Unless you really want to provide the users with a non-standard experience and invent your own controls (which are likely to not be so fine-tuned as those provided out-of-the-box), i would go with UISwitch instead of checkbox and UIPickerView instead of a radiobutton(s)

You have to do it manually by using UIButtons:
Checkbox: create two images, assign one via setImage:forState: with state UIControlStateNormal, the other with state UIControlStateSelected. Then you can toggle the images simply by setting the button's selected property to NO or YES.
Radiobox: same as with checkbox, but you have to keep track of the other radioboxes (e.g. via an array) and set foo.selected = NO for all the not-selected checkboxes.

#Nitin in these cases you have to use the images in UIImageView for checked or unchecked....basically they are images or one more procedure is to use the custom UIButton and give them images accordingly to situation

Related

xcode interface builder objects

I want to create a form for an iphone app. I'm using interface builder to create the fields. I need the equivalent of a select drop down menu. The documentation says to use a pop-up button, but I can't find the darn thing. Where the heck is it??
Also, what about checkboxes?
Thanks
For a drop-down menu use UIPickerView named just "Picker View" in IB. Another option although much harder to implement is a collapsible UITableView.
There are no checkboxes provided by default, so usually it is just an image, that changes when you click it. Or you can use a UISwitch named just "Switch" in IB

How to make a combobox in iphone

I am trying to make a combobox in ios following this link http://www.codeproject.com/KB/iPhone/iphonecombobox.aspx.
But the click event (that shows the picker) seems to work sometimes and sometimes not. It looks like sometimes it just works in some regions of the control and not others.
Any idea of what is wrong?
It's kind of hacky, but you can add a hidden UIControl around the region of the ComboBox and then wire it up to the same IBAction or void that the existing ComboBox uses. For example, -(IBAction) showPicker could be the action of a new UIControl that you add right around the region.
For some reason, the answer was using the textfield and image directly to the page instead of creating a view for the control and using that view N times.
I created a combobox api for iOS, hope this could be of any help: http://www.chupamobile.com/products/details/365/ZComboBox/

how to customize the "Delete" button on swipe

How can I customize the "Delete" Button on swipe. I want to use the small button instead of using this Red Delete Button. I know how to change the title but I want to change the size and image of button.Is it possible?
As I am new, I am not allowed to upload images.
Please help!
This is probably not recommended. Apple likes consistency between all of its apps, so you should consider keeping it that way.

Using radio buttons in iPhone app

How do I a use radio button in an iPhone app? Should I load any image instead of button image?
A fairly standard replacement for radio buttons on iOS is a "picker". An alternative, if you have a large number of potential choices, is to use a static list under a button, and allow only one of the items to be selected and checkmarked.
You can use a custom button & change its image on button click
Take a look at the UISegmentedControl. It functions basically as a radio button for up to ~4 options. There's no maximum limit AFAIK, but any more than 4 is somewhat difficult visually.
Try DLRadioButton, the best Radio Button control for iOS. It is highly customizable, you can also use you own image as selection indicator. It is available through Cocoapods pod 'DLRadioButton', '~> 1.4' and at GitHub.
Screenshot for your reference.

in iphone how to write code for radio button

while i am doing program i got dbt how to write the code for radio button
As Ranjeet says, there is no radio button.
You can used segmented control, switch or button depending on the aim.
iphone does not support radiobutton...
I mean this feature has not present here...
You have to make your tricks(alternates)...
like show and hide images...and some more