Question

I have menu button that is being put in the Navigation controller on every page in the rightBarButtonItem (customer wishes) from a my BaseViewController (all other classes inherit from this).

I want to add a segment controller next to the menu button on one of the pages.

Is there a way to just add a segment controller next to it without replacing one or the other?

I have seen examples of adding 2 items into one controller, but I need to add them at separate times.

Was it helpful?

Solution

You will need to create a view that contains the menu button and the segmented button and then create a UIBarButtonItem using initWithCustomView:(UIView *)customView and pass the view with the buttons. Then set rightBarButtonItem to this barButtonItem.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top