@Danh has given the right answer in his comment. The problem here is that you are saying:
cell.razonSocialLabel.text = balance.razonSocial;
But what if cell
is not actually a BalancesTableViewCell? Then cell.razonSocialLabel
is nil, cell.razonSocialLabel.text
call setText:
on nil, and nothing happens. So you are getting cells, all right, but they are all displayed as blank.
You need to obtain your cells from your real table; that is the table that hands out BalancesTableViewCell when you dequeue a cell. But instead you are obtaining your cells from tableView
, which in the case of the filtered table is the search display controller's table view, which knows nothing of BalancesTableViewCell.
Thus, as Danh rightly says, you must change this line:
BalancesTableViewCell *cell =
(BalancesTableViewCell *)[tableView dequeueReusableCellWithIdentifier:CellIdentifier];
to this:
BalancesTableViewCell *cell =
(BalancesTableViewCell *)[self.tableView dequeueReusableCellWithIdentifier:CellIdentifier];