I have a searchBar I\'m setting in a tableviewcontroller. i\'ve referenced this similar question UISearchBar cannot become first responder after UITableView did re-appear bu
The answer is to call becomeFirstResponder in viewDidAppear.
override func viewDidAppear(_ animated: Bool) { super.viewDidAppear(animated) searchBar?.becomeFirstResponder() }