问题
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