objective-c - 使用选项卡栏 Controller 对导航栏进行分段控制

标签 objective-c xcode uinavigationcontroller uitabbarcontroller uisegmentedcontrol

目前我的应用程序有选项卡栏 Controller ,顶部有导航栏。 我的主要目标是做这样的事情: http://www.roseindia.net/tutorials/newtutorials/iphone/TabwithSegment/Final-image-for-Tab-with-Se.jpg 所以它应该像上图一样,只有分段控件才会改变 TableView ​​。 有什么想法可以实现这一点吗?

最佳答案

试试这个

 [segmentedControl setFrame:[self.navigationController.toolbar bounds]];

 [self.navigationController.toolbar addSubview:segmentedControl];

关于objective-c - 使用选项卡栏 Controller 对导航栏进行分段控制,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12301333/

相关文章:

objective-c - Objective-C 中的 swift 类 : unknown receiver

iOS:Main.storyboard 引用初始 View Controller

objective-c - 开始/结束外观转换的不平衡调用

ios - 在 UIPopoverController 中自定义 titleView

iphone - NSMutableArray addObject 覆盖数据

iphone - 报刊亭图标发生变化并出现问题

objective-c - 收集 NSXMLDocument 警告输出

ios - 错误 : Could not find included file 'Generated.xcconfig' in search paths (in target 'Runner' )

ios - 从 ios xcode 发布到特定 facebook 用户的时间线

objective-c - 确定 UIViewController 第一次出现