2016-06-15 4 views
0

enter image description hereUITableViewCell의 빠른 동적 제약

수동으로 제약 조건을 추가합니다.

Imgv에서 Bottom의 아래쪽 cell.contentView 제약 조건입니다.

오류 MSG

....

"<NSLayoutConstraint:0x7c99b3e0 V:[UIImageView:0x7c983370(100)]>", 
"<NSLayoutConstraint:0x7c99b4a0 UIImageView:0x7c983370.top == UITableViewCellContentView:0x7c987b50.topMargin>", 
"<NSLayoutConstraint:0x7c99b6f0 UIImageView:0x7c983370.bottom == UITableViewCellContentView:0x7c987b50.bottomMargin>", 
"<NSLayoutConstraint:0x7c99afd0 'UIView-Encapsulated-Layout-Height' V:[UITableViewCellContentView:0x7c987b50(115.5)]>" 

Will attempt to recover by breaking constraint 
<NSLayoutConstraint:0x7c99b6f0 UIImageView:0x7c983370.bottom == UITableViewCellContentView:0x7c987b50.bottomMargin> 

문제는 무엇입니까?

+0

top 제약 조건 또는 centerY 제약 조건을 제거하고 –

답변

1

넌 3 개 수직 제약을 동시에 활성화 될 수있는 단지 2있는 가지고 수직

    • 높이
    • 중심 셀
    • 상단으로 뷰의 상단 정렬

    모두 사실 일 수 있지만 (셀이 뷰와 동일한 높이 인 경우) 정확하게 하나의 상황이 있지만 셀이 그보다 높기 때문에 상충되는 제약이 있습니다. Interface Builder가 그것에 대해 경고하지 않는다면, 셀이 런타임에 다른 크기라고 추측합니다.

  • 관련 문제