// // UIView+TYAutoLayout.h // TYAlertControllerDemo // // Created by tanyang on 15/9/8. // Copyright (c) 2015年 tanyang. All rights reserved. // #import @interface UIView (TYAutoLayout) - (void)addConstraintToView:(UIView *)view edgeInset:(UIEdgeInsets)edgeInset; - (void)addConstraintWithView:(UIView *)view topView:(UIView *)topView leftView:(UIView *)leftView bottomView:(UIView *)bottomView rightView:(UIView *)rightView edgeInset:(UIEdgeInsets)edgeInset; - (void)addConstraintWithLeftView:(UIView *)leftView toRightView:(UIView *)rightView constant:(CGFloat)constant; - (NSLayoutConstraint *)addConstraintWithTopView:(UIView *)topView toBottomView:(UIView *)bottomView constant:(CGFloat)constant; - (void)addConstraintWidth:(CGFloat)width height:(CGFloat)height; - (void)addConstraintEqualWithView:(UIView *)view widthToView:(UIView *)wView heightToView:(UIView *)hView; - (NSLayoutConstraint *)addConstraintCenterYToView:(UIView *)yView constant:(CGFloat)constant; - (void)addConstraintCenterXToView:(UIView *)xView centerYToView:(UIView *)yView; - (void)removeConstraintWithAttribte:(NSLayoutAttribute)attr; - (void)removeConstraintWithView:(UIView *)view attribute:(NSLayoutAttribute)attr; - (void)removeAllConstraints; @end