 }
 
 /**
-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

*/
public struct Swiftly {
    /**
    A combined layout representing all sides of a view's alignment rectangle.

    - parameter item: The item that the property is representing. When nil, the layout is relative to the superview.

    - returns: A Swiftly object representing the desired layout.
    */
    public static func flush(_ item: AnyObject? = nil) -> Swiftly {
        return Swiftly(attributes: [.top, .left, .bottom, .right], toItem: item)
    }
    /**
     A combined layout representing all sides of a view's margin alignment rectangle.

     - parameter item: The item that the property is representing. When nil, the layout is relative to the superview.

     - returns: A Swiftly object representing the desired layout.
     */
    public static func flushToMargins(_ item: AnyObject? = nil) -> Swiftly {
        return Swiftly(attributes: [.top, .left, .bottom, .right], toItem: item, otherAttributes: [.topMargin, .leftMargin, .bottomMargin, .rightMargin])
    }
    /**
    A combined layout representing the left and right sides of a view's alignment rectangle.

    - parameter item: The item that the property is representing. When nil, the layout is relative to the superview.

    - returns: A Swiftly object representing the desired layout.
    */
    public static func horizontal(_ item: AnyObject? = nil) -> Swiftly {
        return Swiftly(attributes: [.left, .right], toItem: item)
    }
    /**
     A combined layout representing the left and right sides of a view's margin alignment rectangle.

     - parameter item: The item that the property is representing. When nil, the layout is relative to the superview.

     - returns: A Swiftly object representing the desired layout.
     */
    public static func horizontalMargins(_ item: AnyObject? = nil) -> Swiftly {
        return Swiftly(attributes: [.left, .right], toItem: item, otherAttributes: [.leftMargin, .rightMargin])
    }
    /**
    A combined layout representing the top and bottom sides of a view's alignment rectangle.

    - parameter item: The item that the property is representing. When nil, the layout is relative to the superview.

    - returns: A Swiftly object representing the desired layout.
    */
    public static func vertical(_ item: AnyObject? = nil) -> Swiftly {
        return Swiftly(attributes: [.top, .bottom], toItem: item)
    }
    /**
     A combined layout representing the top and bottom sides of a view's margin alignment rectangle.

     - parameter item: The item that the property is representing. When nil, the layout is relative to the superview.

     - returns: A Swiftly object representing the desired layout.
     */
    public static func verticalMargins(_ item: AnyObject? = nil) -> Swiftly {
        return Swiftly(attributes: [.top, .bottom], toItem: item, otherAttributes: [.topMargin, .bottomMargin])
    }
    /**
    A combined layout representing the center along the x-axis and y-axis of a view's alignment rectangle.

    - parameter item: The item that the property is representing. When nil, the layout is relative to the superview.

    - returns: A Swiftly object representing the desired layout.
    */
    public static func center(_ item: AnyObject? = nil) -> Swiftly {
        return Swiftly(attributes: [.centerX, .centerY], toItem: item)
    }
    /**
    A combined layout representing the height and width of a view's alignment rectangle.

    - parameter item: The item that the property is representing. When nil, the layout is relative to the superview.

    - returns: A Swiftly object representing the desired layout.
    */
    public static func size(_ item: AnyObject? = nil) -> Swiftly {
        return Swiftly(attributes: [.height, .width], toItem: item)
    }
    /**
    A layout representing the left side of a view's alignment rectangle.

    - parameter item: The item that the property is representing. When nil, the layout is relative to the superview.

    - returns: A Swiftly object representing the desired layout.
    */
    public static func left(_ item: AnyObject? = nil) -> Swiftly {
        return Swiftly(.left, toItem: item)
    }
    /**
    A layout representing the right side of a view's alignment rectangle.

    - parameter item: The item that the property is representing. When nil, the layout is relative to the superview.

    - returns: A Swiftly object representing the desired layout.
    */
    public static func right(_ item: AnyObject? = nil) -> Swiftly {
        return Swiftly(.right, toItem: item)
    }
    /**
    A layout representing the top side of a view's alignment rectangle.

    - parameter item: The item that the property is representing. When nil, the layout is relative to the superview.

    - returns: A Swiftly object representing the desired layout.
    */
    public static func top(_ item: AnyObject? = nil) -> Swiftly {
        return Swiftly(.top, toItem: item)
    }
    /**
    A layout representing the bottom side of a view's alignment rectangle.

    - parameter item: The item that the property is representing. When nil, the layout is relative to the superview.

    - returns: A Swiftly object representing the desired layout.
    */
    public static func bottom(_ item: AnyObject? = nil) -> Swiftly {
        return Swiftly(.bottom, toItem: item)
    }
    /**
    A layout representing the leading edge of a view's alignment rectangle.

    - parameter item: The item that the property is representing. When nil, the layout is relative to the superview.

    - returns: A Swiftly object representing the desired layout.
    */
    public static func leading(_ item: AnyObject? = nil) -> Swiftly {
        return Swiftly(.leading, toItem: item)
    }
    /**
    A layout representing the trailing edge of a view's alignment rectangle.

    - parameter item: The item that the property is representing. When nil, the layout is relative to the superview.

    - returns: A Swiftly object representing the desired layout.
    */
    public static func trailing(_ item: AnyObject? = nil) -> Swiftly {
        return Swiftly(.trailing, toItem: item)
    }
    /**
    A layout representing the height of a view's alignment rectangle.

    - parameter item: The item that the property is representing. When nil, the layout is relative to the superview.

    - returns: A Swiftly object representing the desired layout.
    */
    public static func height(_ item: AnyObject? = nil) -> Swiftly {
        return Swiftly(.height, toItem: item)
    }
    /**
    A layout representing the width of a view's alignment rectangle.

    - parameter item: The item that the property is representing. When nil, the layout is relative to the superview.

    - returns: A Swiftly object representing the desired layout.
    */
    public static func width(_ item: AnyObject? = nil) -> Swiftly {
        return Swiftly(.width, toItem: item)
    }
    /**
    A layout representing the center along the x-axis of a view's alignment rectangle.

    - parameter item: The item that the property is representing. When nil, the layout is relative to the superview.

    - returns: A Swiftly object representing the desired layout.
    */
    public static func centerX(_ item: AnyObject? = nil) -> Swiftly {
        return Swiftly(.centerX, toItem: item)
    }
    /**
    A layout representing the center along the y-axis of a view's alignment rectangle.

    - parameter item: The item that the property is representing. When nil, the layout is relative to the superview.

    - returns: A Swiftly object representing the desired layout.
    */
    public static func centerY(_ item: AnyObject? = nil) -> Swiftly {
        return Swiftly(.centerY, toItem: item)
    }
    /**
    A layout representing the baseline of a view.

    - parameter item: The item that the property is representing. When nil, the layout is relative to the superview.

    - returns: A Swiftly object representing the desired layout.
    */
    public static func baseline(_ item: AnyObject? = nil) -> Swiftly {
        return Swiftly(.lastBaseline, toItem: item)
    }

    /**
    A layout representing the top most baseline of a view.

    - parameter item: The item that the property is representing. When nil, the layout is relative to the superview.

    - returns: A Swiftly object representing the desired layout.
    */
    @available(iOS, introduced: 8.0)
    public static func firstBaseline(_ item: AnyObject? = nil) -> Swiftly {
        return Swiftly(.firstBaseline, toItem: item)
    }

    /**
    A layout representing the left margin of a view.

    - parameter item: The item that the property is representing. When nil, the layout is relative to the superview.

    - returns: A Swiftly object representing the desired layout.
    */
    @available(iOS, introduced: 8.0)
    public static func leftMargin(_ item: AnyObject? = nil) -> Swiftly {
        return Swiftly(.leftMargin, toItem: item)
    }
    /**
    A layout representing the right margin of a view.

    - parameter item: The item that the property is representing. When nil, the layout is relative to the superview.

    - returns: A Swiftly object representing the desired layout.
    */
    @available(iOS, introduced: 8.0)
    public static func rightMargin(_ item: AnyObject? = nil) -> Swiftly {
        return Swiftly(.rightMargin, toItem: item)
    }
    /**
    A layout representing the top margin of a view.

    - parameter item: The item that the property is representing. When nil, the layout is relative to the superview.

    - returns: A Swiftly object representing the desired layout.
    */
    @available(iOS, introduced: 8.0)
    public static func topMargin(_ item: AnyObject? = nil) -> Swiftly {
        return Swiftly(.topMargin, toItem: item)
    }
    /**
    A layout representing the bottom margin of a view.

    - parameter item: The item that the property is representing. When nil, the layout is relative to the superview.

    - returns: A Swiftly object representing the desired layout.
    */
    @available(iOS, introduced: 8.0)
    public static func bottomMargin(_ item: AnyObject? = nil) -> Swiftly {
        return Swiftly(.bottomMargin, toItem: item)
    }
    /**
    A layout representing the leading margin of a view.

    - parameter item: The item that the property is representing. When nil, the layout is relative to the superview.

    - returns: A Swiftly object representing the desired layout.
    */
    @available(iOS, introduced: 8.0)
    public static func leadingMargin(_ item: AnyObject? = nil) -> Swiftly {
        return Swiftly(.leadingMargin, toItem: item)
    }
    /**
    A layout representing the trailing margin of a view.

    - parameter item: The item that the property is representing. When nil, the layout is relative to the superview.

    - returns: A Swiftly object representing the desired layout.
    */
    @available(iOS, introduced: 8.0)
    public static func trailingMargin(_ item: AnyObject? = nil) -> Swiftly {
        return Swiftly(.trailingMargin, toItem: item)
    }
    /**
    A layout representing the center along the x-axis between the left and right margins of a view.

    - parameter item: The item that the property is representing. When nil, the layout is relative to the superview.

    - returns: A Swiftly object representing the desired layout.
    */
    @available(iOS, introduced: 8.0)
    public static func centerXWithinMargins(_ item: AnyObject? = nil) -> Swiftly {
        return Swiftly(.centerXWithinMargins, toItem: item)
    }
    /**
    A layout representing the center along the y-axis between the top and bottom margins of a view.

    - parameter item: The item that the property is representing. When nil, the layout is relative to the superview.

    - returns: A Swiftly object representing the desired layout.
    */
    @available(iOS, introduced: 8.0)
    public static func centerYWithinMargins(_ item: AnyObject? = nil) -> Swiftly {
        return Swiftly(.centerYWithinMargins, toItem: item)
    }


                    constraint.priority = priority
                }

                return constraint
            }
        }

