在Xcode 8中自动调整问题 [英] Autoresizing issue in Xcode 8
问题描述
=== 编辑 ========
=== EDIT ========
此问题现已解决 Xcode 8.1 。我已经检查过了。
This issue is now solved in Xcode 8.1. I have checked.
================
================
我不知道自动布局是否正确。所以,我在我的所有应用程序中使用自动调整选项,这对我来说很好。我能够毫无问题地满足我的所有要求。
I don't know auto-layout properly. So, I am using autoresizing option in my all apps and it's fine for me. I am able to fulfill my all requirements by this without any issue.
现在在Xcode 8中,我已将我的旧swift项目迁移到swift 3.现在出现了问题。
Now in Xcode 8, I have migrated my old swift project to swift 3. Now issue arises.
参见图片,我设置了Autoresizing,到目前为止,它在所有设备中都没有问题,而且这个项目在AppStore中正常运行,所以我无法显示UI或故事板。
See in image, I have set Autoresizing, and its working fine without issue in all devices until now and this project is live in AppStore, so that I can't show the UI or storyboard.
现在我必须在项目中做一些更新。所以我现在正在使用Xcode 8。但是我的自动调整功能无法正常工作,因为所有控件都在中心,用户界面搞砸了。
Now I have to do some update in project. So I am working in Xcode 8 now. But my autoresizing not working properly, as all the controls are come in center and UI is messed up.
此问题在设备中也存在。我也检查了模拟器和设备。但问题也存在。任何建议和帮助将不胜感激。在此先感谢。
And the issue persists in device also. I have checked in simulator and device as well. But problem is there also. Any suggestion and help will be appreciated. Thanks in advance.
编辑:
昨天只在运行时出现问题,但今天故事板也改变了这个图像的视图
Yesterday there is issue in runtime only, But Today storyboard also changed views like this image
这意味着整个UI设计搞砸了。这很奇怪。
Which means the whole UI design is messed up. This is weird.
推荐答案
请尝试取消选中xib或storyboard中的自动调整大小。并在 viewDidLoad
设置 [_ scrollView setAutoresizesSubviews:YES];
Please try to uncheck autoresizing from xib or storyboard. And inviewDidLoad
set [_scrollView setAutoresizesSubviews:YES];
如果这可以解决您的问题,请尝试
Try it if this solve your problem
编辑:如果故事板取消选中从NIB调整大小视图
选项。
In case of storyboard uncheck Resize view from NIB
option.
这篇关于在Xcode 8中自动调整问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!