I implemented a searchController and added in navigationItem.
That's code:
var searchController = UISearchController(searchResultsController: nil)
searchController.obscuresBackgroundDuringPresentation = false
definesPresentationContext = true
searchController.searchResultsUpdater = self
searchController.searchBar.placeholder = NSLocalizedString("Search", comment: "")
searchController.hidesNavigationBarDuringPresentation = true
// Layout
searchController.searchBar.barTintColor = UIColor.groupTableViewBackground
navigationItem.searchController = searchController
When I click in searchBar to write something, this warning appears in console:
NameOfProject[9238:211033] +[CATransaction synchronize] called within transaction NameOfProject[9238:211033] +[CATransaction synchronize] called within transaction NameOfProject[9238:211033] +[CATransaction synchronize] called within transaction NameOfProject[9238:211033] +[CATransaction synchronize] called within transaction
Please, someone knows how to solve this?
Thanks in advance!!