开发者

Adding Segment controller to place that already has one

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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜