Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Best radio-button implementation for IOS

I would like to ask if there are examples out there on how to implement radio-button options on an iPhone app.

I find the Picker View quite big for a simple selection feature.

I'm not sure if Apple excluded radio buttons on purpose, and whether if it is better to simply use a Picker View from a usability / user experience point-of-view.

like image 307
Jonas Arcangel Avatar asked Jan 31 '11 03:01

Jonas Arcangel


2 Answers

I have some thoughts on how the best radio button implementation should look like. It can be based on UIButton class and use it's 'selected' state to indicate one from the group. The UIButton has native customisation options in IB, so it is convenient to design XIBs. Also there should be an easy way to group buttons using IB outlet connections:

I have implemented my ideas in this RadioButton class. Works like a charm:

Download the sample project.

like image 178
onegray Avatar answered Sep 20 '22 01:09

onegray


Try UISegmentedControl. It behaves similarly to radio buttons -- presents an array of choices and lets the user pick 1.

like image 37
jlstrecker Avatar answered Sep 19 '22 01:09

jlstrecker