0

导入“UITableView+hideSeparators.h”

我为 UITableView 创建了一个类别。这使我可以隐藏其上的分隔符,但是我的理解是导入此类别会使文件中的所有 UITableView 具有导入的方法?

[self hideSeparators];

这有效,但

[[[self searchDisplayController] searchResultsTableView] hideSeparators];

生产

No visible @interface for 'UITableView' declares the selector 'hideSeparators'

为什么类别适用于 TableView 而不适用于 searchResultsTableView?

4

1 回答 1

1

你真的需要一个类别来隐藏分隔符吗?为什么你不能只是尝试一些东西

[[self searchDisplayController] searchResultsTableView].separatorColor = [UIColor clearColor]
于 2012-08-21T08:23:14.193 回答