在Interface Builder中更改UINavigationController UIViewController的Title视图 [英] Changing the Title View of a UINavigationController UIViewController in Interface Builder

查看:156
本文介绍了在Interface Builder中更改UINavigationController UIViewController的Title视图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以更改 UIViewController 中包含的标题视图(即添加 UISegmentedControl )接口生成器中的code> UINavigationController ?我目前正在代码中执行此工作:

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;
}

但是,我更愿意在IB中设置所有人。谢谢!

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

推荐答案

使用IB将UISegmentedControl添加到NavigationBar

这篇关于在Interface Builder中更改UINavigationController UIViewController的Title视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆