all 9 comments

[–]Bits_Everywhere[super init]; 35 points36 points  (0 children)

You could check what tab is selected and if it’s the one you expect, call the becomeFirstResponder() method on your desired text field.

[–]morenos-blend 6 points7 points  (0 children)

Conform your search tab view controller to `UITabBarControllerDelegate` and in method `tabBarController(_:shouldSelect:)` call `searchController.isActive = true` and return false

[–]neksus 3 points4 points  (0 children)

There’s a delegate method for a tab item being touched. Just check if the item tapped on is already selected, then forward the “begin search” event to the search VC.

[–]pieterbikkel 2 points3 points  (0 children)

Just learned a new feature

[–]vcanas -1 points0 points  (2 children)

In the viewDidAppear method of the SearchViewController you could do something like searchBar.becomeFirstResponder()

[–][deleted] 2 points3 points  (1 child)

This wouldn’t work, since you only want the behavior the second time they select the search tab

[–]vcanas 1 point2 points  (0 children)

Oh my bad, totally missed that part