lib/ProMotion/table/extensions/searchable.rb in ProMotion-2.7.1 vs lib/ProMotion/table/extensions/searchable.rb in ProMotion-2.8.0

- old
+ new

@@ -1,13 +1,16 @@ module ProMotion module Table module Searchable + def search_controller + @search_controller ||= UISearchController.alloc.initWithSearchResultsController(nil) + end + def make_searchable(params = nil) # params argument is deprecated. No longer need to use it. params = get_searchable_params self.definesPresentationContext = true - search_controller = UISearchController.alloc.initWithSearchResultsController(nil) search_controller.delegate = params[:delegate] search_controller.searchResultsUpdater = params[:search_results_updater] search_controller.hidesNavigationBarDuringPresentation = params[:hides_nav_bar] search_controller.dimsBackgroundDuringPresentation = params[:obscures_background] # iOS 8+ (not deprecated yet) # search_controller.obscuresBackgroundDuringPresentation = params[:obscures_background] # iOS 9.1+ recommends using this instead of dimsBackgroundDuringPresentation