LoginSignup
1

More than 5 years have passed since last update.

AutoLayoutで画面をちょうど2分割するViewをつくる(Xcode7)

Posted at

Main_storyboard_—_Edited6.png

2つViewをつくり、StackしてStackViewに入れます。1つ目のViewを右クリックしたまま引っ張って2つ目のViewの上で放し、「Equal Heights」を選びます。あとはStackViewの上下左右の余白を設定し、AlignmentをFillにします。


2つViewをつくり、両方選択してStackしてStackViewに入れます。

1つ目のViewを右クリックしたまま引っ張って2つ目のViewの上で放し、「Equal Heights」を選びます。

スクリーンショット_2016-10-15_12_45_25.png

あとはStackViewの上下左右の余白を設定し、AlignmentをFillにします(最初の図)。

Alignmentは段落スタイルの右寄せとか中央寄せに使われるので、ここでは「水平方向はFillを指定」ということなのでしょう。


ブログやっています:http://weed.nagoya

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
1