MrDatabase
MrDatabase

Reputation: 44455

Specify height of UITableViewCell in search results

My UITableViewCells have a custom height of 120 points. I've just added a search bar and search results controller via Interface Builder. The search feature works. Only problem is the height of the UITableViewCells in the search results is smaller than 120 points (think its the default height).

How can I specify the height of the cells in the search results?

Upvotes: 3

Views: 229

Answers (2)

Benjamin Mayo
Benjamin Mayo

Reputation: 6679

Alternatively to Mark Adams suggestion, you can return 120 from within the delegate method heightForRowAtIndexPath: in the searchResultsDelegate property of the controller.

Upvotes: 4

Mark Adams
Mark Adams

Reputation: 30846

Change the rowHeight property on the searchResultsTableView property of UISearchDisplayController.

Upvotes: 1

Related Questions