UIRadioButton

open class UIRadioButton: CustomUIButton

UIRadioButton is a subclass of CustomUIButton.

It implemets single selection between a group of buttons with a single group id.

  • Inspectable propert to holds a group id.

    Declaration

    Swift

    @IBInspectable open var groupId:Int
  • Inspectable propert to flag a button to be initially selected. - Default value is false.

    Declaration

    Swift

    @IBInspectable open var initiallySelected:Bool = false
  • Constructor to setup/ initialize components with a radio group id.

    • Parameters:
      • frame: View Frame
      • radioGroupId: Group Id

    Declaration

    Swift

    public init(frame: CGRect, radioGroupId:Int)

    Parameters

    frame

    View Frame

    radioGroupId

    Group Id

  • Required constructor implemented.

    Declaration

    Swift

    required public init?(coder aDecoder: NSCoder)
  • Overridden method to setup/ initialize components.

    Declaration

    Swift

    override open func awakeFromNib()
  • It returns selected radio button for a given radio group id

    Declaration

    Swift

    class open func getSelectedButton(_ radioGroupId:Int) -> UIRadioButton?