     private func kgn_constrainSizeAttribute(sizeAttribute: NSLayoutAttribute, size: CGFloat = 0, priority: UILayoutPriority? = nil) -> NSLayoutConstraint {
         assert(self.superview != nil, "Can't create constraints without a superview")
 
-        self.translatesAutoresizingMaskIntoConstraints()
+        self.setTranslatesAutoresizingMaskIntoConstraints(false)
         let constraint = NSLayoutConstraint(item: self, attribute: sizeAttribute, relatedBy: .Equal, toItem: nil, attribute: .NotAnAttribute, multiplier: 0, constant: size)
         if let p = priority {
             constraint.priority = p

        commonSuperview!.addConstraint(constraint)
        return constraint
    }

}

    private func kgn_constrainEdgeAttribute(edgeAttribute: NSLayoutAttribute, offset: CGFloat = 0, priority: UILayoutPriority? = nil) -> NSLayoutConstraint{
        assert(self.superview != nil, "Can't create constraints without a superview")

        self.setTranslatesAutoresizingMaskIntoConstraints(false)
        let constraint = NSLayoutConstraint(item: self, attribute: edgeAttribute, relatedBy: .Equal, toItem: self.superview, attribute: edgeAttribute, multiplier: 1, constant: offset)
        if let p = priority {
            constraint.priority = p
