iOS8 - constraints ambiguously suggest a height of zero

前端 未结 18 1841
青春惊慌失措
青春惊慌失措 2020-12-02 14:15

Has anyone got any idea how to debug this?

Warning once only: Detected a case where constraints ambiguously suggest a height of zero for a tableview c

18条回答
  •  爱一瞬间的悲伤
    2020-12-02 14:49

    I was using a mapView inside uitableviewcell. I changed the height of map view to 1/3th of the device screen size. I got the same error. I fixed the error by adding missing constraints to the content view of the uitableviewcell.

    1) Clear the contentView constraints.

    2) Set Reset to Suggested constants to contentView.

    3) Add missing constraints - if any

    4) We make sure the content view has all the required constraints.

提交回复
热议问题