The following classes are available globally.
This class provides a simple Swift-only module that implements a “checkbox” to replace the standard UISwitch. The switch can behave exactly like a standard UISwitch, but also has a “three-state” option, where it has definitely off, definitely on, and clear, which is a sort of “undefined” state. Default is two-state (like UISwitch). The class can use the SFSymbols checkbox symbols, but these are a bit awkward for UIKit (which is why UIKit doesn’t use them), so we have three dynamically-generated “artisanal” images that can be used to implement a round checkbox, which is friendlier for fat fingers. You can also supply three images to use for the control (or only two, if you are sticking with the “two-state” version). All images are drawn template mode, using the controlSee more
tintColor. Like the UISwitch class, you can specifically call
setOn(_:animated:), and it will animate the transition. You can also call
setClear(animated:), if in three-state mode. This uses haptics, in the same manner as UISwitch, except that you can turn them off, by setting
@IBDesignable open class RVS_Checkbox : UIControl