开发者

searchResultsTableView takes entire screen on ipad

开发者 https://www.devze.com 2023-02-13 02:38 出处:网络
I am working on a app for the iPad which has a tableView on the left and a view on the right. We are not using the UISplitViewController.

I am working on a app for the iPad which has a tableView on the left and a view on the right. We are not using the UISplitViewController.

I have been able to setup filtered results using the Search Display Controller and a search bar, but the search results take up the entire screen.

Ideally, I would like to have the search results only take up the same amount of screen as our tableView. Or, barring that, have a way to dismiss the search results when 'didSelectRowAtIndexPath' is activated.

I'm not sure what code I should post. I'm using the code from the Apple code sample: TableSearch.

  • on the comment below: something like this..?

    [self.searchDispl开发者_如何学运维ayController.searchResultsTableView setFrame:myTableView.view];


By default, table views take up the whole screen, but there is nothing stopping you from setting their frame.

Just call -setFrame on the searchResultsTableView property of your search display controller.

0

精彩评论

暂无评论...
验证码 换一张
取 消