:  ~ 2 min read

I was in need of a radio button recently, and it had to be designed like a Google Material Design radio button. Nothing too fancy, but I wanted to spice it up a little bit, by adding a nice animation. The idea was to:

This is the result:

The library repo can be found here, and its CocoaPods page here.

It can be installed either by dragging the contents of the source folder to your Xcode project, either by adding pod 'LTHRadioButton' to your Podfile.

It's pretty straightforward to use:

init(radius: CGFloat = 18, selectedColor: UIColor? = nil, deselectedColor: UIColor? = nil) // Colors default internally if nil.
func select(animated: Bool = true) // Selects the radio button.
func deselect(animated: Bool = true) // Deselects the radio button.