I want to add a segment controller to the navigation bar not as the title, but like this:
How can I do that?
The problem is that it looks like this uses the navigation bar's title, which is actually in the same place as where you want your segmented control to go. Instead, you need to add a "prompt" to the navigation bar to increase the height of the bar, and add the prompt text above the content area of the bar.
This can be done purely in Interface Builder as illustrated by the screenshot below, or programmatically using the following code:
[self.navigationController.navigationItem setPrompt:@"some prompt text"];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With