2012-11-22 14 views

回答

1

範圍是您正在搜索的「區域」,如果您已經實施它。例如。

Search with scope bar

您可以將相關的範圍,然後傳遞給filterContentForSearchText:scope:如下:

[self filterContentForSearchText:searchString 
          scope:[[self.searchDisplayController.searchBar scopeButtonTitles] objectAtIndex:[self.searchDisplayController.searchBar selectedScopeButtonIndex]]]; 

這是從Apple's TableSearch sample code拍攝。

+0

所以,如果我不想要範圍,我可以將它設置爲零。好,謝謝。 – pbibergal

+1

我仍然不會退出獲取「區域」的手段。如果屏幕上只有一個搜索欄,那麼這是真的,我不必打擾範圍? – DavidLiu