This is a simple UIButton subclass to be used to add a circular radio button. You can use it by subclass a UIButton from the storyboard or create the button programmatically.
According to documentation the Customizations should be available:
backgroundFillColor - This will be the background color to fill the button with
borderColor - Border color of the UIButton
borderWidth - Border width of the UIButton
To have this properly working while accessing properties by code:
let button = MRRadioButton() button.backgroundFillColor = .blue button.borderColor = .red
but currently we have an build error ''backgroundFillColor' is inaccessible due to 'internal' protection level'
Those properties should be declared as open
wrong:
@IBInspectable var backgroundFillColor : UIColor = UIColor.black{
correct:
@IBInspectable open var backgroundFillColor : UIColor = UIColor.black{
That is a fair point. I forgot I had changed it to use cocoapods, instead of dragging and dropping the file. If your need is urgent, you can download the project and copy the file!
According to documentation the Customizations should be available:
backgroundFillColor - This will be the background color to fill the button with borderColor - Border color of the UIButton borderWidth - Border width of the UIButton
To have this properly working while accessing properties by code:
let button = MRRadioButton() button.backgroundFillColor = .blue button.borderColor = .red
but currently we have an build error ''backgroundFillColor' is inaccessible due to 'internal' protection level'Those properties should be declared as open wrong:
@IBInspectable var backgroundFillColor : UIColor = UIColor.black{
correct:@IBInspectable open var backgroundFillColor : UIColor = UIColor.black{
Should be updated for all three