-
drag
radioButton.swiftto project -
drag a
UIButtonto Storyboard -
click
identity inspectorpage, setting Custom class asradioButton
set button style fromesystemtocustom

-
Connect by IBCollection

in swift file, it should look like
@IBOutlet var btns: [radioButton]! -
Connect every radio button by
Touch up insideto SAME method
@IBAction func test(_ sender: UIButton) {
for btn in self.btns {
if btn == sender {
btn.isSelected = true
}
else {
btn.isSelected = false
}
}
}- line Color: outter circle line color
- fill Color: inner circel filled color
- padding: padding between circle and text (maybe not adjust it)
- line width: outter circle line width

