Post not yet marked as solved
Post marked as unsolved with 0 replies, 292 views
class SearchController: UISearchController {
override func viewDidLoad() {
super.viewDidLoad()
}
override func viewWillDisappear(_ animated: Bool) {
let appDelegate = UIApplication.shared.delegate as! AppDelegate
AppDelegate.searchFlag = true
DispatchQueue.main.async(execute: {
self.searchBar.text = "abc"
})
}
override func viewWillAppear(_ animated: Bool) {
self.view.frame.origin.y = 400
self.view.frame.origin.x = 400
}
}
how to add this SearchController on search view controller because when use this code self.present(appDelegate.searchController, animated: true, completion: nil) it is showing full width screen