Using radio buttons in iPhone app
How do I a use radio button in an iPhone app? Sho开发者_JAVA百科uld 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.
精彩评论