报错:
Trapped uncaught exception 'NSInvalidArgumentException', reason: '*** +[NSLayoutConstraint constraintWithItem:attribute:relatedBy:toItem:attribute:multiplier:constant:]: A constraint cannot be made between a leading/trailing attribute and a right/left attribute. Use leading/trailing for both or neither.'
堆栈信息:
原因:你在制定约束时,约束的对象和参考对象没有使用同一约束的成员属性,如下:
前面使用leading那么后者也要用leading,保持前后一致就好。