LoginSignup
5
5

More than 5 years have passed since last update.

Storyboardのデフォルトで設定されているmarginを0にする

Posted at

直したいのはコレ!

storyboardでUILabelの左右を画面サイズに合わせて引き伸ばし、constraintsを左右マージン0に設定したが、何故かupdateすると自動的に-20のマージンが設定されてしまう。

Screen-Shot-2015-11-09-at-20.10.22.png

解決方法

左マージン

Screen-Shot-2015-11-09-at-20.21.18.png

該当のconstraintを選択し、「First Item」にある「relative to margin」のチェックを外します。
Screen Shot 2015-11-09 at 20.21.03.png

そして、「Constant」を0に設定します。
Screen Shot 2015-11-09 at 20.21.03.png

右マージン

Screen-Shot-2015-11-09-at-20.20.03.png

該当のconstraintを選択し、今度は「Second Item」にある「relative to margin」のチェックを外します。そして、同様に「Constant」を0に設定します。

これだけ!

Screen-Shot-2015-11-09-at-20.21.53.png

5
5
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
5