Unable to simultaneously satisfy constraints

后端 未结 6 1349
暖寄归人
暖寄归人 2020-12-28 18:22

Actually integrated camera application using xib, in that I placed uiview on a view, after that I put imageview, again view on imageview for cropping. then run the project

6条回答
  •  -上瘾入骨i
    2020-12-28 18:46

    The error is what it says, and gives quite clear instructions for you to begin debugging. There are two constraints that conflict. Each instructs the Auto Layout runtime to do something that contradicts the other.

    If you are creating and adding views programmatically, then chances are Auto Resizing attributes have been automatically translated to Auto Layout constraints.

    So, the first thing to try is, with your programmatically created views, disable this by setting:

    myProgrammaticView.translatesAutoresizingMaskIntoConstraints = NO;
    

提交回复
热议问题