     override func awakeFromNib() {
         super.awakeFromNib()
         
+        guide.identifier = self.identifier ?? "?.?"
+        
+        self.addLayoutGuide()
+        
+        if let view1 = self.secondItem as? UIView {
+            self.convertToLeadingConstraint(linkedView: view1)
+        } else if let guide1 = self.secondItem as? UILayoutGuide {
+            self.convertToLeadingConstraint(linkedGuide: guide1)
+        } else {
+            assertionFailure("Not connected to a view or a layout guide")
+            return
+        }
+        
+        if let view2 = self.firstItem as? UIView {
+            self.convertToTrailingConstraint(linkedView: view2)
+        } else if let guide2 = self.firstItem as? UILayoutGuide {
+            self.convertToTrailingConstraint(linkedGuide: guide2)
+        } else {
+            assertionFailure("Not connected to a view or a layout guide")
+            return
+        }
+        
+        self.applySpacingConstraints()
+        
+        self.isActive = false
+    }
+    
+    // MARK: -
+    
+    private func addLayoutGuide() {
         var parent: UIView?
-        var constraints: [NSLayoutConstraint] = []
         
         if let view1 = self.firstItem as? UIView,
             let view2 = self.secondItem as? UIView {

            let constraint = guide.heightAnchor.constraint(equalTo: height.guide.heightAnchor)
            
            if height.guide.owningView != nil {
                constraints.append(constraint)
            } else {
                height.altConstraints.append(constraint)
            }
        }
        
        constraints.forEach({ $0.isActive = true })
        altConstraints.forEach({ $0.isActive = true })
        
        altConstraints.removeAll()
        
        self.isActive = false
    }
}

            return
        }
        
        superview.addLayoutGuide(guide)
    }
    
    private func convertToLeadingConstraint(linkedView view: UIView) {
        let attr = self.secondAttribute
        
        switch attr {
        case .left,
             .right,
             .leading,
             .trailing:
            guide.leadingAnchor.constraint(equalTo: view.xAxisAnchor(forAttribute: attr)).isActive = true
        case .leftMargin,
             .rightMargin,
             .leadingMargin,
             .trailingMargin:
            guide.leadingAnchor.constraint(equalTo: view.layoutMarginsGuide.xAxisAnchor(forAttribute: attr)).isActive = true
        case .top,
             .bottom:
            guide.topAnchor.constraint(equalTo: view.yAxisAnchor(forAttribute: attr)).isActive = true
        case .topMargin,
             .bottomMargin:
            guide.topAnchor.constraint(equalTo: view.layoutMarginsGuide.yAxisAnchor(forAttribute: attr)).isActive = true
        default:
            assertionFailure("Invalid attribute supplied")
            return
        }
    }
    
    private func convertToLeadingConstraint(linkedGuide: UILayoutGuide) { 
        let attr = self.secondAttribute
        
        switch attr {
        case .left,
             .right,
             .leading,
             .trailing:
            guide.leadingAnchor.constraint(equalTo: linkedGuide.xAxisAnchor(forAttribute: attr)).isActive = true
        case .top,
             .bottom:
            guide.topAnchor.constraint(equalTo: linkedGuide.yAxisAnchor(forAttribute: attr)).isActive = true
        default:
            assertionFailure("Invalid attribute supplied")
            return
        }
    }
    
    private func convertToTrailingConstraint(linkedView view: UIView) {
        let attr = self.firstAttribute
        
        switch attr {
        case .left,
             .right,
             .leading,
             .trailing:
            guide.trailingAnchor.constraint(equalTo: view.xAxisAnchor(forAttribute: attr)).isActive = true
        case .leftMargin,
             .rightMargin,
             .leadingMargin,
             .trailingMargin:
            guide.trailingAnchor.constraint(equalTo: view.layoutMarginsGuide.xAxisAnchor(forAttribute: attr)).isActive = true
        case .top,
             .bottom:
            guide.bottomAnchor.constraint(equalTo: view.yAxisAnchor(forAttribute: attr)).isActive = true
        case .topMargin,
             .bottomMargin:
            guide.bottomAnchor.constraint(equalTo: view.layoutMarginsGuide.yAxisAnchor(forAttribute: attr)).isActive = true
        default:
            assertionFailure("Invalid attribute supplied")
            return
        }
    }
    
    private func convertToTrailingConstraint(linkedGuide: UILayoutGuide) {
        let attr = self.firstAttribute
        
        switch attr {
        case .left,
             .right,
             .leading,
             .trailing:
            guide.trailingAnchor.constraint(equalTo: linkedGuide.xAxisAnchor(forAttribute: attr)).isActive = true
        case .top,
             .bottom:
            guide.bottomAnchor.constraint(equalTo: linkedGuide.yAxisAnchor(forAttribute: attr)).isActive = true
        default:
            assertionFailure("Invalid attribute supplied")
            return
        }
    }
    
    private func applySpacingConstraints() {
        if let width = equalWidthTo {
            let constraint = guide.widthAnchor.constraint(equalTo: width.guide.widthAnchor)
            
            if width.guide.owningView != nil {
                constraint.isActive = true
            } else {
                width.altConstraints.append(constraint)
            }
