开发者

searchResultsTableView takes entire screen on ipad

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜