mirror of
https://github.com/zhigang1992/ProMotion.git
synced 2026-05-28 23:50:54 +08:00
Merge pull request #145 from clearsightstudio/table-screen-search-index-fix
Table screen search index fix
This commit is contained in:
@@ -10,10 +10,10 @@ module ProMotion
|
||||
search_bar.placeholder = params[:search_bar][:placeholder]
|
||||
end
|
||||
|
||||
@contacts_search_display_controller = UISearchDisplayController.alloc.initWithSearchBar(search_bar, contentsController: params[:content_controller])
|
||||
@contacts_search_display_controller.delegate = params[:delegate]
|
||||
@contacts_search_display_controller.searchResultsDataSource = params[:data_source]
|
||||
@contacts_search_display_controller.searchResultsDelegate = params[:search_results_delegate]
|
||||
@table_search_display_controller = UISearchDisplayController.alloc.initWithSearchBar(search_bar, contentsController: params[:content_controller])
|
||||
@table_search_display_controller.delegate = params[:delegate]
|
||||
@table_search_display_controller.searchResultsDataSource = params[:data_source]
|
||||
@table_search_display_controller.searchResultsDelegate = params[:search_results_delegate]
|
||||
|
||||
self.table_view.tableHeaderView = search_bar
|
||||
end
|
||||
|
||||
@@ -106,7 +106,11 @@ module ProMotion
|
||||
|
||||
# Set table_data_index if you want the right hand index column (jumplist)
|
||||
def sectionIndexTitlesForTableView(table_view)
|
||||
self.table_data_index if self.respond_to?(:table_data_index)
|
||||
if @promotion_table_data.filtered
|
||||
nil
|
||||
else
|
||||
self.table_data_index if self.respond_to?(:table_data_index)
|
||||
end
|
||||
end
|
||||
|
||||
def tableView(table_view, cellForRowAtIndexPath:index_path)
|
||||
|
||||
Reference in New Issue
Block a user