報錯:app
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.'對象
堆棧信息:ip
緣由:你在制定約束時,約束的對象和參考對象沒有使用同一約束的成員屬性,以下:it
前面使用leading那麼後者也要用leading,保持先後一致就好。io