Xcode 9 - “Fixed Width Constraints May Cause Clipping” and Other Localization Warnings

后端 未结 13 1180
失恋的感觉
失恋的感觉 2020-11-27 10:33

I downloaded the new Xcode and in Interface Builder I\'m having a ton of problems with warnings that say things like:

Fixed Width Constraints May Caus

13条回答
  •  盖世英雄少女心
    2020-11-27 11:16

    As you can see in the image below, I was having the error "Fixed Width Constraints May Cause Clipping" because although I had set my textbox to be vertically centered and my label to have a left margin constraint, I hadn't defined a constraint for the text box in relation to the label, so XCode was alerting me that the textbox could clip (be rendered above) the label.

    After adding the left constraint to the text box to always stay some distance apart from the label the error was considered solved by XCode and it didn't bothered me with the constraint warning anymore.

提交回复
热议问题