6
6

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

iOSアプリで実際の描画サイズとself.view.frameの数値が違うとき、「Resize View from nib」にチェックを入れる

Last updated at Posted at 2015-03-12

self.view.frameの幅:高さが、常に600:600になっていて困りました。
シミュレータがiPadでも5Sでも4Sでも6でも、常に600:600。
こうなると、画像の中心点xをself.view.frame.width / 2に置く、とかができません。

storyboardで設定したら直りました。

a8c456292cf0b6b24a51a9c0690803a8.png

Attributes inspector内、View Controllerのlayoutにある「Resize View from nib」チェックボックスにチェックを入れます。
すると、self.view.frameのwidthやheightが実際の値になりました。

自分で外したんだと思いますが。。

6
6
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
6
6

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?