I have to implement the following layout:
For this, I have the following constraints:
- UINavigation bar should be the system's because every other imitation looks ugly
- UISegmentedControl should be placed inside the navigation bar
- the segmented control should be placed below the navigation buttons
- I have to use UISearchDisplayController to have the system default search look & feel
- For the UISearchDisplayController to work I have to have UITableViewController, because it does not work with a simple UIViewController
I have found several solutions for something similar (like this question), but they either use UIToolbar
/UIView
(which I can't add to my controller, because all UITableViewController
has is a scroll view), or hacking system navigation bar (in which either the buttons are aligned to the bottom, or it uses private iOS frameworks which is a forbidden fruit, we know it). I also tried to add the segmented control to the tableHeaderView
, but it is consumed by the search bar.
Is this even possible to do?