When developed the app in XCode8 it used to work fine, both in Portrait and Landscape modes.
在XCode8中开发应用程序时,它在纵向和横向模式下都能正常工作。
Didn't change anything particular.
没有改变任何特别的东西。
Now started to developed in Xcode9, Portrait works fine but any View in the App, if switched to Landscape it acts weird. Like in the images , view gets cut off
现在开始在Xcode9中开发,肖像工作正常,但在应用程序中的任何视图,如果切换到横向它行为奇怪。就像在图像中一样,视图被切断了
I use Autolayouts in Storyboard...
我在故事板中使用Autolayouts ......
Is this happening because of new safearea
feature?
是否因为新的安全区功能而发生这种情况?
EDIT: View Hierarchy added for Sign View
编辑:查看为Sign View添加的层次结构
3 个解决方案
#1
3
This can be due to some layer effect which are applying unintentionally on UIViewControllerWrapperView. Please Check your UIViewControllerWrapperView layer properties or some layer effect on your UINavigationController.
这可能是由于某些层效应在UIViewControllerWrapperView上无意中应用。请检查UIVavigationControllerWrapperView图层属性或UINavigationController上的某些图层效果。
#2
1
First of all please update your xcode to 9.2 if you are using any version below that.
首先,如果您使用的是以下任何版本,请将您的xcode更新为9.2。
next turn on the storyboard feature called - "Use Safe Area Layout Guides" option inside "File inspector"
接下来打开“文件检查器”中名为“使用安全区域布局指南”选项的故事板功能
then remove and re-apply the viewController constraints.
然后删除并重新应用viewController约束。
hope it will work!
希望它能奏效!
#3
1
This can be caused by anything, wihout reviewing the code this cant be answered properly.
这可能是由任何事情造成的,无需审查代码,无法正确回答。
My suggestions are to check for a layer
property added to any view in the hierarchy. The view may not have been updated properly in Landscape mode due to the new autoLayout
property of Xcode 9
.
我的建议是检查添加到层次结构中任何视图的图层属性。由于Xcode 9的新autoLayout属性,在横向模式下可能未正确更新视图。
I have a feeling that it may have been caused by the "Hugin.ShadowView", if any shadow property added, please check the constraint of the view it is added to and rectify it as needed for Xcode 9
.
我感觉它可能是由“Hugin.ShadowView”引起的,如果添加了任何阴影属性,请检查它添加到的视图的约束并根据Xcode 9的需要进行纠正。
If this doesn't help you you may share a short and simple project file and i'll have a look at it.
如果这对您没有帮助,您可以共享一个简短的项目文件,我会看看它。
#1
3
This can be due to some layer effect which are applying unintentionally on UIViewControllerWrapperView. Please Check your UIViewControllerWrapperView layer properties or some layer effect on your UINavigationController.
这可能是由于某些层效应在UIViewControllerWrapperView上无意中应用。请检查UIVavigationControllerWrapperView图层属性或UINavigationController上的某些图层效果。
#2
1
First of all please update your xcode to 9.2 if you are using any version below that.
首先,如果您使用的是以下任何版本,请将您的xcode更新为9.2。
next turn on the storyboard feature called - "Use Safe Area Layout Guides" option inside "File inspector"
接下来打开“文件检查器”中名为“使用安全区域布局指南”选项的故事板功能
then remove and re-apply the viewController constraints.
然后删除并重新应用viewController约束。
hope it will work!
希望它能奏效!
#3
1
This can be caused by anything, wihout reviewing the code this cant be answered properly.
这可能是由任何事情造成的,无需审查代码,无法正确回答。
My suggestions are to check for a layer
property added to any view in the hierarchy. The view may not have been updated properly in Landscape mode due to the new autoLayout
property of Xcode 9
.
我的建议是检查添加到层次结构中任何视图的图层属性。由于Xcode 9的新autoLayout属性,在横向模式下可能未正确更新视图。
I have a feeling that it may have been caused by the "Hugin.ShadowView", if any shadow property added, please check the constraint of the view it is added to and rectify it as needed for Xcode 9
.
我感觉它可能是由“Hugin.ShadowView”引起的,如果添加了任何阴影属性,请检查它添加到的视图的约束并根据Xcode 9的需要进行纠正。
If this doesn't help you you may share a short and simple project file and i'll have a look at it.
如果这对您没有帮助,您可以共享一个简短的项目文件,我会看看它。