![](/img/trans.png)
[英]Objective C can i use ANSI library if i want to run my application in iOS?
[英]Can't use a github library in my iOS application correctly
我想实现一个基于UINavigationController的自定义菜单,但标准的Cocoa类不能自动排队视图控制器之间的转换,所以我决定使用这个简单的NavController实现https://github.com/Plasma/BufferedNavigationController没有这个问题。但我不能在我的项目中使用它。
在自述文件中,他们说“要使用,只需将提供的文件添加到项目中,并将UINavigationController类更改为继承自Interface Builder中的BufferedNavigationController。” 但我不明白如何在Interface Builder中更改继承。 我试着在我的代码中这样做:
//Here is my custom NavController which is inherited BufferedNavigationController instead of UINavigationController
@interface CPNMenuController : BufferedNavigationController
{
UITableView *menuPicker; .....
但事情没有发生 - 因为我看到方法是从标准UINavigationController调用的。 我理解 - 这是一个虚拟的问题但是我是iOS开发的新手,可能是我在README中没有正确理解或者我做错了什么。我需要帮助。 提前致谢。
在Storyboard中,选择要更改的UINavigationController。 打开Identity Inspector面板(右侧边框的第3个)。 在“自定义类”下,您应该能够在列表中看到BufferedNavigationController(或您的子类,CPNMenuController)。 选择它。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.