damienromito / UIView-UpdateAutoLayoutConstraints

An easy way to create and update AutoLayout Constraints (Mainly to update Width and Height of UIView)
MIT License
102 stars 12 forks source link

Always creates new height constraint, as it cannot be found on superview #4

Open bobmoff opened 10 years ago

bobmoff commented 10 years ago

height constraint is contained on self, not superview

2014-09-12 at 11 17

CedricSoubrie commented 9 years ago

Totally agree. The height constraint is contained directly in the view set of constraint not in the superview set. I had warning for incompatible constraints because the height constraint was not found and you recreated a new one all the time.

I did the same thing as bobmoff and it solved my problem.

damienromito commented 9 years ago

Yes sorry guys, I've no time to change this now. Cause When I fix this, that create other bugs. I will take a look on this later.

lixiaoyu commented 9 years ago

@CedricSoubrie I encouter the problems too,but if I remove the .superview,It crash when I call - (BOOL) setConstraintConstant:(CGFloat)constant forAttribute:(NSLayoutAttribute)attribute, how did you solved it? And it only happen in iOS 7,iOS 8 fine;