fix: search controller cannot trigger become first responder issue

This commit is contained in:
CMK 2021-11-03 15:29:25 +08:00
parent 757578e97e
commit e15e373f3d
2 changed files with 5 additions and 3 deletions

View File

@ -307,8 +307,8 @@ extension RootSplitViewController: WizardViewControllerDelegate {
let cell = contentSplitViewController.sidebarViewController.collectionView.cellForItem(at: indexPath) as? SidebarListCollectionViewCell,
let contentView = cell._contentView,
let frame = sourceViewFrameInTargetView(
sourceView: contentView.avatarButton,
targetView: wizardView
sourceView: contentView.avatarButton,
targetView: wizardView
)
else {
assertionFailure()

View File

@ -245,7 +245,9 @@ extension SearchDetailViewController {
searchBar.becomeFirstResponder()
} else {
searchController.isActive = true
searchController.searchBar.becomeFirstResponder()
DispatchQueue.main.asyncAfter(deadline: .now() + 0.33) {
self.searchController.searchBar.becomeFirstResponder()
}
}
}