         }
     }
 
-    override func layoutSubviews() {
+    override public func layoutSubviews() {
         super.layoutSubviews()
         let height: CGFloat = self.frame.height
         let width: CGFloat = self.frame.width

        return animation
    }

    func animationDidStart(_ anim: CAAnimation) {
        if self.isOn {
            thumbLayer.path = UIBezierPath(arcCenter: rightArcCenter, radius: thumbRadius, startAngle: 0, endAngle: CGFloat(M_PI*2), clockwise: true).cgPath
            onLayer.path = fullPath


let rcSwitchFontSize: CGFloat = 12

public class RCSwitch: UIControl, CAAnimationDelegate {

    // the text showing when isOn == true
    var onText: String = "" {
