使用右侧导航栏按钮从 nib 文件推送视图
正如标题中所述,我想使用导航栏上的按钮从已知的 NIB 推送视图。我正在开发 UINavigationController 应用程序。
我已经在 IB 中添加了右侧按钮,并将其链接到 RootViewController 中的方法,
我到处搜索,但找不到执行此方法的方法...
-(IBAction)addItems:(id)sender
{
?
}
我也尝试过 此解决方案,但它也不起作用......
As described in the title, i would like to push a view, from a known NIB, using a button on the navigation bar. I'm working on a UINavigationController app.
I already added the right button in IB and i linked it to the method that is in the RootViewController
I have searched everywhere but I couldn't find a way to do this method...
-(IBAction)addItems:(id)sender
{
?
}
I also tried this solution, but it isn't working either...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
例如:
其中
CustomController
是您的自定义控制器类的名称。@"CustomController"
xib 文件的名称For example:
Where
CustomController
name of your custom controller class.@"CustomController"
name of your xib file如果你只需要 nib 文件中的视图,那么试试这个..
如果你想推送 ViewController..那么请使用 Nekto 的答案。
If you just need the view from nib file, then try this..
If you want to push a ViewController..Then go with the Nekto's Answer.