Peek and Pop (3 D Touch) does not work in UITableView with searchResultsController==nil when search is active

Originator:hm.stahl
Number:rdar://31958545 Date Originated:2017-05-03
Status:Open Resolved:No
Product:iOS Product Version:10.3
Classification: Reproducible:Always
 
Area:
UIKit

Summary:
I have two apps presenting as main view a UITableViewController with a UISearchController which does NOT use its own searchResultsController. Rather the apps use the original table view controller containing the search bar and searchable contents, i.e. searchController.searchResultsController is set to nil. 

Peek and Pop work perfectly when the search controller is not active, however, as soon as you activate the search by touching the search text field, peek and pop stop working.   

This is probably due to the fact that 3D touches are somehow sent to searchController.searchResultsController, which is nil and therefore cannot handle 3d touch events. Apple should change this behaviour: if searchController.searchResultsController is nil the 3d touches must be handled by the original table view in lieu of the not existing searchResultsController.

Steps to Reproduce:
Any table view (enabled for peek and pop, i.e. with "self.previewingContext = [self registerForPreviewingWithDelegate:self sourceView:self.view]") which handles search results by itself, i.e. with searchController.searchResultsController == nil.

Expected Results:
3D touches should be handled by original table view.

Actual Results:
3 D touches are not processed if search controller is active and  searchController.searchResultsController == nil.

Version:
iOS 10.3.1

Notes:


Configuration:
iPhone 7 128 GB

Attachments:

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!