最近在自定义UICollectionViewCell,cell里面UITextView约束如下:
inputTextView.snp.makeConstraints { (make) in
make.left.top.equalTo(self).offset(kAdaptedWidth(10))
make.right.bottom.equalTo(self).offset(kAdaptedWidth(-10))
}
结果编译报以下打印警告:
[LayoutConstraints] Unable to simultaneously satisfy constraints.
Probably at least one of the constraints in the following list is one you don't want.
Try this:
(1) look at each constraint and try to figure out which you don't expect;
(2) find the code that added the unwanted constraint or constraints and fix it.
<__NSArrayI 0x60000128e9d0>(
<SnapKit.LayoutConstraint:0x60000385f660@GoodsTypeInputCollectionViewCell.swift#22 UITextView:0x7fbb870f1000.top ==app.GoodsTypeInputCollectionViewCell:0x7fbb86c4a430.top + 10.0>,
<SnapKit.LayoutConstraint:0x60000385f720@GoodsTypeInputCollec