         }
     }
     
-    override func layoutSubviews() {
+    override public func layoutSubviews() {
         super.layoutSubviews()
         
         if !isAnimating {

import UIKit
import QuartzCore

@IBDesignable @objc  class  SevenSwitch: UIControl {
    
    // public
    
    /*
    *   Set (without animation) whether the switch is on or off
    */
    @IBInspectable var  on: Bool {
    get {
        return switchValue
    }
    set {
        switchValue = newValue
        self.setOn(newValue, animated: false)
    }
    }

    /*
    *	Sets the background color that shows when the switch off and actively being touched.
    *   Defaults to light gray.
    */
    @IBInspectable var activeColor: UIColor = UIColor(red: 0.89, green: 0.89, blue: 0.89, alpha: 1) {
    willSet {
        if self.on && !self.tracking {
            backgroundView.backgroundColor = newValue
        }
    }
    }
    
    /*
    *	Sets the background color when the switch is off.
    *   Defaults to clear color.
    */
    @IBInspectable var inactiveColor: UIColor = UIColor.clearColor() {
    willSet {
        if !self.on && !self.tracking {
            backgroundView.backgroundColor = newValue
        }
    }
    }
    
    /*
    *   Sets the background color that shows when the switch is on.
    *   Defaults to green.
    */
    @IBInspectable var onTintColor: UIColor = UIColor(red: 0.3, green: 0.85, blue: 0.39, alpha: 1) {
    willSet {
        if self.on && !self.tracking {
            backgroundView.backgroundColor = newValue
            backgroundView.layer.borderColor = newValue.CGColor
        }
    }
    }
    
    //var offTintColor: UIColor
    
    /*
    *   Sets the border color that shows when the switch is off. Defaults to light gray.
    */
    @IBInspectable var borderColor: UIColor = UIColor(red: 0.78, green: 0.78, blue: 0.8, alpha: 1) {
    willSet {
        if !self.on {
            backgroundView.layer.borderColor = newValue.CGColor
        }
    }
    }
    
    /*
    *	Sets the knob color. Defaults to white.
    */
    @IBInspectable var thumbTintColor: UIColor = UIColor.whiteColor() {
    willSet {
        if !userDidSpecifyOnThumbTintColor {
            onThumbTintColor = newValue
        }
        if (!userDidSpecifyOnThumbTintColor || !self.on) && !self.tracking {
            thumbView.backgroundColor = newValue
        }
    }
    }
    
    /*
    *	Sets the knob color that shows when the switch is on. Defaults to white.
    */
    @IBInspectable var onThumbTintColor: UIColor = UIColor.whiteColor() {
    willSet {
        userDidSpecifyOnThumbTintColor = true
        if self.on && !self.tracking {
            thumbView.backgroundColor = newValue
        }
    }
    }
    
    /*
    *	Sets the shadow color of the knob. Defaults to gray.
    */
    @IBInspectable var shadowColor: UIColor = UIColor.grayColor() {
    willSet {
        thumbView.layer.shadowColor = newValue.CGColor
    }
    }
    
    /*

    *   The image is centered in the area not covered by the knob.
    *   Make sure to size your images appropriately.
    */
    @IBInspectable public var onImage: UIImage! {
        willSet {
            onImageView.image = newValue
        }
    }
    
    /*
