         superview.addConstraint(l)
     }
     
+    
+    class func horizontalEvenSpaceInCotainer(#superview:UIView ,layouts:[Layout],coverSpace:Bool) {
+        var tmpView:[UIView] = []
+        layouts.map({tmpView.append($0.target)})
+        horizontalEvenSpaceInCotainer(superview:superview ,views:tmpView,coverSpace:coverSpace)
+    }
     
     class func horizontalEvenSpaceInCotainer(#superview:UIView ,views:[UIView],coverSpace:Bool) {
         if coverSpace {

    }
    
    
    func fromLeft(base:UIView) -> Layout{
        let l =  NSLayoutConstraint(item: self._layout._target, attribute: .Left, relatedBy: .Equal, toItem: base, attribute: .Left, multiplier: 1.0, constant: self._size)
        self._layout.addLayoutConstraint(l)
        return self._layout
    }
    
    func fromRight(base:UIView) -> Layout{
        let l =  NSLayoutConstraint(item: self._layout._target, attribute: .Left, relatedBy: .Equal, toItem: base, attribute: .Right, multiplier: 1.0, constant: self._size)
        self._layout.addLayoutConstraint(l)
        return self._layout

    }
}


//change constant
extension Layout {

    func toLeft(size:CGFloat) -> Layout {
        self._leftConstraint?.constant = size
        return self
    }
    
    func toTop(size:CGFloat) -> Layout {
        self._topConstraint?.constant = size
        return self
    }
    
    
}


//screen positon
extension Layout {
 
    func viewController() -> UIViewController? {
        return viewController(self._target.nextResponder())
    }
    
    private func viewController(responder:UIResponder?) -> UIViewController? {
        if responder == nil {
            return nil
        } else if responder is UIViewController {
            return responder as UIViewController!
        }
        
        return viewController(responder!.nextResponder())
    }
 
    func rootView() -> UIView {
        return Layout.rootView(self._target)
    }
    
    class func rootView(view:UIView) -> UIView {
        if view.superview == nil {
            return view
        } else {
            return rootView(view.superview!)
        }
    }
    
    func displayRect() -> CGRect {
        return self._target.convertRect(self._target.bounds, toView: Layout.rootView(self._target))
    }
    
    //func anotherViewRect(anotherView:UIView) -> CGRect {
    //   return self._target.convertRect(self._target.bounds, fromView: anotherView)
    //}
}


//horizontalEvenSpace
extension Layout {
    
