是否可以使用 UITableView 的单元格作为其下方视图的遮罩?
我希望背景图像仅在各个单元格所在的位置可见,因此当您滚动时,它会显示下方固定图像的不同部分。如果这有意义的话,它基本上与背景上带有不透明单元格的常见表格视图相反。
除了用作遮罩边界的边缘之外,我仍然希望正常渲染单元格,因为它们具有文本和其他子视图,而不仅仅是用于遮罩。
我找不到例子,但我在使用 CSS 之前见过这个效果,它看起来不错。它并不是非常复杂,但我似乎无法找到在 UIKit 中实现它的有效方法。
I want the background image to only be visible where the individual cells are, so as you scroll it reveals different parts of a fixed image underneath. It's basically the opposite of a common tableview with opaque cells over a background, if that makes sense.
I still want the cells to be rendered normally in addition to their edge serving as a mask boundary, since they'd have text and other subviews that aren't just for masking.
I can't find an example, but I've seen this effect before done using CSS and it looks nice. It's not incredibly complicated, but I can't seem to figure out an efficient way to do it in UIKit.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论