mirror of
https://github.com/zhigang1992/ProMotion.git
synced 2026-05-13 10:07:02 +08:00
Merge pull request #628 from squidpunch/fix-search-height
Adds delegate to set height of search results
This commit is contained in:
@@ -57,6 +57,10 @@ module ProMotion
|
||||
self.table_view.setScrollEnabled false
|
||||
@table_search_display_controller.delegate.will_begin_search if @table_search_display_controller.delegate.respond_to? "will_begin_search"
|
||||
end
|
||||
|
||||
def searchDisplayController(controller, didLoadSearchResultsTableView: tableView)
|
||||
tableView.rowHeight = self.table_view.rowHeight
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -52,4 +52,10 @@ describe "Searchable table spec" do
|
||||
controller.will_end_search_called.should == true
|
||||
end
|
||||
|
||||
it "should set the row height of the search display to match the source table row height" do
|
||||
tableView = UITableView.alloc.init
|
||||
tableView.mock!(:rowHeight=)
|
||||
controller.searchDisplayController(controller, didLoadSearchResultsTableView: tableView)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user