我正在制作一个简单的应用程序,我喜欢在整个 UI 中使用蓝色效果。通常,如果我使用 tableView,我会将 4 个边缘一直固定到 viewController 的边缘,并且所有内容都在模糊的导航栏和标签栏“后面”正确滚动。
但是,对于一个场景,我希望将一个视图“原始发布 VisualFX 视图”“固定”在顶部,而答案字段在该视图和导航/底部栏后面滚动。
这是视图层次结构:
Even after I turned off "clip to bounds" on the tableview as well as every view in the hierarchy above it, I can only get the tableView to scroll a BIT behind the Original Post VisualFX View and the bottom tab bar before they disappear. I assume it's because tableViews don't draw things that aren't visible at all within its bounds.
I'm trying to do everything in the Storyboard in IB with as little code as possible. I feel like this shouldn't be that hard, right?
因此,经过一段时间的修补后,我找到了一个解决方法:对整个场景使用 TableViewController,并仅使用自定义 TableViewCell 作为标题,当您滚动时将其固定在顶部。通过使用 ClearColor 作为背景并在背景中放置一个带有模糊效果的 UIVisualEffectView,我能够让一切都完美地工作。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句