RadioButton for iOS
An easy way to implement RadioButtons in Swift
pod 'GARRadioButton', '~> 1.0'
Go to Attributes Inspector and del delete the Default Title
Set IBOutlets in the ViewController
ViewController
```
import UIKit
import GARRadioButton
class ViewController: UIViewController {
@IBOutlet weak var radioButtonOne: RadioButton!
@IBOutlet weak var radioButtonTwo: RadioButton!
var radioController: RadioButtonController!
override func viewDidLoad() {
super.viewDidLoad()
let arrRadioButtons: [RadioButton] = [radioButtonOne, radioButtonTwo]
radioController = RadioButtonController(arrRadioButton: arrRadioButtons)
}
}
extension ViewController: RadioButtonControllerDelegate {
func radioButton(_ radioButtonController: RadioButtonController, radioButton changed: RadioButton) {
}
}
```