【发布时间】:2018-05-17 02:14:15
【问题描述】:
【问题讨论】:
-
到目前为止你尝试过什么?也许至少有一些代码示例?
-
您可以在选择时略微减小单元格宽度。
标签: ios swift uitableview
【问题讨论】:
标签: ios swift uitableview
如果您只想要左右阴影,则在顶部和底部插入矩形,以便顶部和底部阴影隐藏在您的视图后面:
CGRect shadowRect = CGRectInset(someView.bounds, 0, 4); // inset top/bottom
someView.layer.shadowPath = [[UIBezierPath bezierPathWithRect:shadowRect] CGPath];
【讨论】:
我还没有找到使用 Tableview 的解决方案。我认为这是表格视图的限制。一种解决方法是使用 collectionView 而不是表视图。
【讨论】: