문제

This is a button created with interface builder:

enter image description here

What is this orange dashed line (button text area, right?), why this is outside the button and how do I make it be inside the button (if this is the case)???

도움이 되었습니까?

해결책

It's because you have auto layout on and that's what it thinks the size and position should be based on the constraints. Sometimes it shows this when the element is moved or resized without adjusting constraints, other times it shows because the constraints given are ambiguous.

다른 팁

Google auto layout. You haven't provided all the required constraints or they aren't the ones you want. The red box indicates where your button would be if it follows the provided constraints.

One possible fix: in interface builder, you see a few buttons on the bottom right. click the third one and then select update constraints.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top