UITableView - 删除“非活动”的分隔符行 [英] UITableView - remove separator for "inactive" rows
本文介绍了UITableView - 删除“非活动”的分隔符行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的屏幕类似于:
I have screen similar to:
我想删除tableView中最后一个活动单元格下面的分隔符(在这种情况下,所有内容都在Kompozytorzy下面。如何删除这个分隔符?
I want to remove separator below last "active" cell in tableView (in this case everything below "Kompozytorzy". How can i remove this separators?
我尝试在 cellForRow:AtIndexPath:
中自定义分隔符,但每次我更改它都会影响整个tableView。
I try to customize separators in cellForRow:AtIndexPath:
, but everytime i change it this effect whole tableView.
推荐答案
对于只有几行的普通样式表视图,这是正常的行为。一个简单的解决方案是提供一个空的表页脚:
This is normal behavior for a plain style table view with just a few rows. A simple solution is to provide an empty table footer:
self.tableView.tableFooterView = [[UIView alloc] init];
这篇关于UITableView - 删除“非活动”的分隔符行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文