我已将 UITableView 放入 UIVisualEffectView 以实现活力。除了弹跳功能外,一切正常。滚动时没有单元格的空间会以某种灰色绘制,而不是模糊效果。我试图将所有背景颜色设置为清除,但模糊仍然不会显示。有什么方法可以使背景与表格 View 的其余部分具有相同的效果?
You can find the demo project here
最佳答案
从属性中设置表格 View 、TableviewCell 和 ContainerView 的清除颜色。如果不是 Clear,则将代码放入您的 View Controller 中。还选择了 cell none 选项。
SWIFT
func tableView(tableView: UITableView, willDisplayCell cell: UITableViewCell, forRowAtIndexPath indexPath: NSIndexPath) {
cell.backgroundColor = UIColor.clearColor()
}
关于ios - UIVisualEffectView 和 UITableView,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31023962/