Size of UIView object in Interface Builder changes

2019-07-22 15:08发布

I have an extra UIView object that I just dragged onto the storyboard. It covers the entire iPhone screen. So I clicked on it and dragged it until it only covered half of the iPhone screen.

This is what my storyboard looks like with my extra UIView object selected:

enter image description here

However, when I actually use the app on my iPhone, the UIView is much smaller and doesn't even take up half of the screen(It's the square with the stackoverflow site image inside of it):

enter image description here

How can I keep it from being smaller when I actually run the app? When running the app, I want the UIView object to be the same size as it is on the storyboard in xcode.

Thanks for the help.

1条回答
在下西门庆
2楼-- · 2019-07-22 15:41

enter image description here

You must have selected Autolayout. Uncheck it and problem is resolved.

查看更多
登录 后发表回答