Tag: peek pop

search结果中的3D Peek&Pop

我使用search栏来过滤我的表格视图。 我在显示可search内容的相同视图控制器中显示search结果。 它工作正常。 除了一件事 – 3D Peek和Pop不适用于search结果 。 我曾尝试Storyboard segue中的“Peek&Pop”checkbox。 我没有尝试在我的TableViewController中编程偷看和stream行。 结果是一样的:peek&pop适用于表格视图单元格,但不适用于search结果单元格。 这里是search和偷看&stream行代码片断: // Add a search bar searchController = UISearchController(searchResultsController: nil) tableView.tableHeaderView = searchController.searchBar searchController.searchResultsUpdater = self searchController.hidesNavigationBarDuringPresentation = false searchController.dimsBackgroundDuringPresentation = false self.tableView.contentOffset = CGPoint(x: 0, y: searchController.searchBar.frame.height) // Register for preview if traitCollection.forceTouchCapability == .available { previewingContext = registerForPreviewing(with: self, sourceView: tableView) […]

使用UISearchController时,UITableView单元上的Peek和Pop失败

Peek和Pop正在使用UISearchController 。 但是,一旦开始使用updateSearchResultssearch表,Peek和Pop将停止工作。 我已经使用UISearchController演示扩展了Apple的Table Search以支持Peek和Pop作为示例: 问题是当我开始search表时,Peek和Pop不再工作。 它只是select突出显示它: 我做的更新是MainTableViewController是: class MainTableViewController: BaseTableViewController, UISearchBarDelegate, UISearchControllerDelegate, UISearchResultsUpdating { override func viewDidLoad() { super.viewDidLoad() … if traitCollection.forceTouchCapability == .available { registerForPreviewing(with: self, sourceView: tableView) } } } extension MainTableViewController: UIViewControllerPreviewingDelegate { func previewingContext(_ previewingContext: UIViewControllerPreviewing, viewControllerForLocation location: CGPoint) -> UIViewController? { guard let indexPath = tableView?.indexPathForRow(at: location), let cell […]