This is a Apple simple guide about Table Search with UISearchController, and I have downloaded the demo project and it is working well.
I want to have transparent navigation bar on product detail view (DetailViewController.swift). After changing some behaviors I have transition issue when going back from product detail to device list with swipe gesture(Video link below).
https://www.dropbox.com/s/denqomhhxasxv58/issue.mov?dl=0
For transparent navigation bar I have added this lines on DetailViewController viewWillAppear method
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
// ...
navigationController?.navigationBar.setBackgroundImage(UIImage(), for: .default)
}
In MainTableViewController.swift I have added this code to make navigationBar default style.
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
navigationController?.navigationBar.setBackgroundImage(nil, for: .default)
navigationController?.navigationBar.shadowImage = UIImage()
}
Also I made changes on MainTableViewController viewDidLoad method and sets this properties to true.
navigationItem.hidesSearchBarWhenScrolling = true
searchController.dimsBackgroundDuringPresentation = true
So my problem is to fix that issue. Anyone can help me?
Update:
Swipe transition from product detail to device list
Search controller active state when product detail not opened
Search controller active state after product detail opened