如何在Swift 3中将edgesForExtendedLayout设置为none [英] How to set edgesForExtendedLayout to none in Swift 3
问题描述
问题是我的View在中包含
隐藏在 UIView
和 UITableView
ScrollView UINavigationBar
下如果设置为半透明。
我考虑了几个主题,例如这个,但他们都是建议设置:
self.edgesForExtendedLayout = UIRectEdgeNone
在Swift 2中,此代码为:
self.edgesForExtendedLayout = .None
我今天已更新到Xcode 8.1和Swift 3.0.1,但我找不到任何内容关于此事的发布说明。/ p>
编译器告诉我, .None
已更改为 .none
,但船尾呃编辑, .none
不存在。将其更改为 .top
没有任何效果。
tableView以编程方式设置并放置 insets
无效,因为我有 scrollView
,其中包含 UIView
隐藏在 UINavigationBar
下的 UITableView
。
我错过了什么?非常感谢帮助。
将其设置为 []
。这与没有一样。
The problem is that my View, containing a UIView
and a UITableView
within a ScrollView
, gets hidden under the UINavigationBar
if set translucent.
I have considered several threads like this, but they all suggest to set:
self.edgesForExtendedLayout = UIRectEdgeNone
In Swift 2, this code was:
self.edgesForExtendedLayout = .None
I have updated to Xcode 8.1 and Swift 3.0.1 today, but I can't find anything in the release notes about this matter.
The compiler tells me, that .None
got changed to .none
, but after edit, that .none
does not exist. Changing it to .top
did not had any effect.
The tableView is setup programatically and putting insets
does not help because I have a scrollView
with a UIView
on top of the UITableView
that is hidden under the UINavigationBar
.
What am I missing? Help is very appreciated.
Set it to []
. That is the same as none.
这篇关于如何在Swift 3中将edgesForExtendedLayout设置为none的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!