 }
 
 /**
-Assign a property of a view equal to that property on another view. Useful for things such as settings the top of a view equal to the top of another view.
+Assign a property of a `Swiftlyable` equal to that property on another `Swiftlyable`. Useful for things such as settings the top of a view equal to the top of another view.
 
 - parameter left:  Layout property to assign
 - parameter right: View to equal
 
 - returns: A Swiftly object representing the desired constraint
 */
-public func ==(left: Swiftly, right: AnyObject) -> Swiftly {
+public func ==(left: Swiftly, right: Swiftlyable) -> Swiftly {
     var result = left
     result.toItem = right
     return result
 }
 
 /**
-Assign a property of a view equal to a constant. Useful for things such as settings the top of a view equal to the top of another view.
+Assign a property of a `Swiftlyable` equal to a constant. Useful for things such as settings the top of a view equal to the top of another view.
 
 - parameter left:  Layout property to assign
 - parameter right: Constant to assign

    var otherAttributes: [NSLayoutAttribute]?
    var multiplier: CGFloat
    var constant: CGFloat
    var toItem: AnyObject?
    var priority: UILayoutPriority?

    init(_ a: NSLayoutAttribute? = nil, attributes atts: [NSLayoutAttribute]? = nil, relatedBy r: NSLayoutRelation? = .equal, toItem ti: AnyObject? = nil, otherAttribute oa: NSLayoutAttribute? = nil, otherAttributes otherAtts: [NSLayoutAttribute]? = nil, multiplier m: CGFloat = 1, constant c: CGFloat = 0) {
        attribute = a
        attributes = atts
        relatedBy = r


import UIKit

public protocol Swiftlyable {

    var superview: UIView? { get }

}

extension UIView: Swiftlyable {}

@available(iOS, introduced: 9.0)
extension UILayoutGuide: Swiftlyable {

    public var superview: UIView? {
        return owningView
    }

}

public extension Swiftlyable {

    /**
     Apply an array of Swiftly objects to a `Swiftlyable`. This is appended to any existing constraints.

     - parameter layoutArray: The layout(s) to apply.

     - returns: An array of constraints that represent the applied layout. This can be used to dynamically enable / disable a given layout.
     */
    internal func applyLayout(layoutArray: [Swiftly]) -> [NSLayoutConstraint] {
        guard let superview = superview else {
            fatalError("You must assign a superview before applying a layout")
        }

        if let view = self as? UIView {
            view.translatesAutoresizingMaskIntoConstraints = false
        }

        let constraints = layoutArray.flatMap { l -> [NSLayoutConstraint] in
            let attributes: [NSLayoutAttribute]
            if let attrs = l.attributes {
                attributes = attrs
