LoginSignup
8
10

More than 5 years have passed since last update.

ステータスバーがTableViewに被らないようにする方法 Storyboard編

Last updated at Posted at 2015-09-06

やること

  1. Constrain to margins のチェックを外す
  2. ステータスバー分の20 上部にマージンをとる

解決したい事象

StoryBoardのViewにtableViewを置くと
一番上のセルやセクションがステータスバーに被ってしまいます。
iOS Simulator-1.jpg

解決方法

Autolayoutで上にステータスバー分20スペースを取ります。
画像右下の「Add 4 Constraints」を押し忘れないよう注意してください。
スクリーンショット 2015-09-06 12.48.27.jpg

設定後の画面

ステータスバーの分下にさがるので、表示が被らなくなります。
iOS Simulator-2.jpg

8
10
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
8
10