好了,我已经成功地将一个rightBarButtonItem调用自定义选择器(从一个UIViewController调用),具体如下:如何将多个按钮添加到NavigationBar?
UIButton* infoButton = [UIButton buttonWithType:UIButtonTypeInfoLight];
[infoButton addTarget:self action:@selector(showInfoView:) forControlEvents:UIControlEventTouchUpInside];
self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:infoButton];
是否有可能作出“正确的栏按钮项目”实际上是几个不同按钮(从而从导航栏中删除标题文本)?
我在寻找方式来获得更多的屏幕房地产,这似乎是一个合乎逻辑的选择......虽然任何其他建议,将不胜感激(也许我应该减少标签栏的大小,我在底部使用...)
@Matt是正确的UISegmented控制不是为此目的,你应该从Apple First阅读UIDesign参考指南。谢谢 – 2012-06-07 21:17:48
公平地说,当这个答案发布时,他们的设计参考是不同的。 – 2014-10-06 14:26:06