1、Error :
NSInvalidArgumentException: A multiplier of 0 or a nil second item together with a location for the first attribute creates an illegal constraint of a location equal to a constant. Location attributes must be specified in pairs
自動布局注意事項:
注意事項1:設(shè)置translatesAutoresizingMaskIntoConstraints為NO;
注意事項2:兩個view在同一個hierarchy中才有可能添加相關(guān)約束。
注意事項3:當(dāng)firstAttribute不為寬或者高時,multipler不能為0挑势。
注意事項4:同上,當(dāng)firstAttribute不為寬或者高時啦鸣,secondItem不能為nil潮饱。
當(dāng)兩個Attribute全是寬或高時multiplier才可以為0;
當(dāng)secondItem為nil時赏陵,secondAttribute應(yīng)為NSLayoutAttributeNotAnAttribute