关于translatesAutoresizingMaskIntoConstraints

參考網址

  • 錯誤截圖如下

关于translatesAutoresizingMaskIntoConstraints_第1张图片
image.png
  • 由於我不是在首頁出現的這個問題,所以需要到達這個介面的打印中才會有AMBIGUOUS信息

关于translatesAutoresizingMaskIntoConstraints_第2张图片
image.png
  • 找出關鍵字AMBIGUOUS

 |   *UIImageView:0x7f976072d0d0- AMBIGUOUS LAYOUT for UIImageView:0x7f976072d0d0.minX{id: 1479}, UIImageView:0x7f976072d0d0.minY{id: 1482}
 |   *UILabel:0x7f976073bad0'君亭套房'- AMBIGUOUS LAYOUT for UILabel:0x7f976073bad0'君亭套房'.minX{id: 1515}, UILabel:0x7f976073bad0'君亭套房'.minY{id: 1513}, UILabel:0x7f976073bad0'君亭套房'.Width{id: 1519}, UILabel:0x7f976073bad0'君亭套房'.Height{id: 1520}
 |   *UIImageView:0x7f97607281e0- AMBIGUOUS LAYOUT for UIImageView:0x7f97607281e0.minX{id: 1498}, UIImageView:0x7f97607281e0.minY{id: 1490}
|   UILabel:0x7f9760733800'45平米 双人床2米 有窗 剩余0间'
 |   *UILabel:0x7f9760747460'1145'- AMBIGUOUS LAYOUT for UILabel:0x7f9760747460'1145'.minX{id: 1504}, UILabel:0x7f9760747460'1145'.minY{id: 1502}
 |   UIView:0x7f976074f8b0

  • 通過lldb將背影色變紅,然後可以很清楚知道是哪裏出問題了


    关于translatesAutoresizingMaskIntoConstraints_第3张图片
    image.png

你可能感兴趣的:(关于translatesAutoresizingMaskIntoConstraints)