Changing the Title View of a UINavigationController UIViewController in Interface Builder

冷暖自知 提交于 2019-12-12 04:45:35

问题


Is it possible to change the title view (i.e. add a UISegmentedControl) for a UIViewController contained within a UINavigationController from within Interface Builder? I am currently doing this work from within code with:

-(void)viewDidLoad
{
    [super viewDidLoad];
    self.navigationItem.titleView = self.filterSegmentedControl;
}

However, I'd prefer to set everyone up in IB. Thanks!


回答1:


Using IB to add a UISegmentedControl to a NavigationBar



来源:https://stackoverflow.com/questions/4881378/changing-the-title-view-of-a-uinavigationcontroller-uiviewcontroller-in-interfac

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!