Q1spa
在工做中發現,須要代碼添加NSLayoutConstraint的時候,發現出現以下問題:
ast
Unable to simultaneously satisfy constraints.im
Probably at least one of the constraints in the following list is one you don't wantdi
解決方案: 設置view的translatesAutoresizingMaskIntoConstraints的屬性爲NO便可解決view
Q2vi
出現以下問題:The view hierarchy is not prepared for the constraint:ant
解決方案:先將view添加到superview上,而後再添加NSLayoutConstraint約束條件便可解決解決方案