次のようにして、テーブルビューのセルをプログラムで強調表示し、選択ロジックをトリガーしようとしています
NSIndexPath*indexPath = [NSIndexPath indexPathForRow:0 inSection:0];
[self.tableView selectRowAtIndexPath:indexPath animated:NO scrollPosition:UITableViewScrollPositionNone];
[self tableView:self.tableView didSelectRowAtIndexPath:indexPath];
行が一瞬だけ強調表示されます。別の行を選択するまで強調表示したままにしたい。
これらの行を追加してみました
UITableViewCell *cell = [self.tableView cellForRowAtIndexPath: indexPath];
cell.highlighted = YES;
しかし、これを行うと、別の行をクリックしてもハイライトが残り、最初の行をもう一度クリックするまで消えませんでした。
何か案は?