         super.init(coder: aDecoder)
         self.setupNib()
     }
-
-    // MARK: - Nib loading
-
-    /**
-        Called in init(frame:) and init(aDecoder:) to load the nib and add it as a subview.
-    */
-    private func setupNib() {
-        let view = self.loadNib()
-        self.addSubview(view)
-        view.translatesAutoresizingMaskIntoConstraints = false
-        let bindings = ["view": view]
-        self.addConstraints(NSLayoutConstraint.constraintsWithVisualFormat("H:|[view]|", options:NSLayoutFormatOptions(rawValue: 0), metrics:nil, views: bindings))
-        self.addConstraints(NSLayoutConstraint.constraintsWithVisualFormat("V:|[view]|", options:NSLayoutFormatOptions(rawValue: 0), metrics:nil, views: bindings))
-    }
 }
 
 @IBDesignable
-public class NibDesignableTableViewCell: UITableViewCell {
-    
+public class NibDesignableTableViewCell: UITableViewCell, NibDesignableProtocol {
+    public override var nibContainerView: UIView {
+        get {
+            return self.contentView
+        }
+    }
+
     // MARK: - Initializer
     override public init(style: UITableViewCellStyle, reuseIdentifier: String?) {
         super.init(style: style, reuseIdentifier: reuseIdentifier)
         self.setupNib()
     }
-    
+
     // MARK: - NSCoding
     required public init?(coder aDecoder: NSCoder) {
         super.init(coder: aDecoder)
         self.setupNib()
     }
-    
-    // MARK: - Nib loading
-    
-    /**
-        Called in init(frame:) and init(aDecoder:) to load the nib and add it as a subview.
-    */
-    private func setupNib() {
-        let view = self.loadNib()
-        self.contentView.addSubview(view)
-        view.translatesAutoresizingMaskIntoConstraints = false
-        let bindings = ["view": view]
-        self.contentView.addConstraints(NSLayoutConstraint.constraintsWithVisualFormat("H:|[view]|", options:NSLayoutFormatOptions(rawValue: 0), metrics:nil, views: bindings))
-        self.contentView.addConstraints(NSLayoutConstraint.constraintsWithVisualFormat("V:|[view]|", options:NSLayoutFormatOptions(rawValue: 0), metrics:nil, views: bindings))
-    }
 }
 
 @IBDesignable
-public class NibDesignableControl: UIControl {
+public class NibDesignableControl: UIControl, NibDesignableProtocol {
 
     // MARK: - Initializer
     override public init(frame: CGRect) {

        let nib = UINib(nibName: self.nibName(), bundle: bundle)
        return nib.instantiateWithOwner(self, options: nil)[0] as! UIView
    }
    
    /**
    Called in the default implementation of loadNib(). Default is class name.
    
    - returns: Name of a single view nib file.
    */
    public func nibName() -> String {
        return self.dynamicType.description().componentsSeparatedByString(".").last!
    }
}

@IBDesignable
public class NibDesignable: UIView {

    // MARK: - Initializer
    override public init(frame: CGRect) {


import UIKit

public protocol NibDesignableProtocol: NSObjectProtocol {
    var nibContainerView: UIView { get }
    // MARK: - Nib loading

    /**
    Called to load the nib in setupNib().

    - returns: UIView instance loaded from a nib file.
    */
    func loadNib() -> UIView
    /**
     Called in the default implementation of loadNib(). Default is class name.

     - returns: Name of a single view nib file.
     */
    func nibName() -> String
}

extension NibDesignableProtocol {
    // MARK: - Nib loading

    /**
    Called to load the nib in setupNib().

    - returns: UIView instance loaded from a nib file.
    */
    public func loadNib() -> UIView {
