简体   繁体   English

无法正确使用我的iOS应用程序中的github库

[英]Can't use a github library in my iOS application correctly

I want to implement a custom menu based on UINavigationController, but standard Cocoa class can't automatically queue up transitions between view controllers, so I decided to use this simple NavController implementation https://github.com/Plasma/BufferedNavigationController without this problem.But I can't use it in my project. 我想实现一个基于UINavigationController的自定义菜单,但标准的Cocoa类不能自动排队视图控制器之间的转换,所以我决定使用这个简单的NavController实现https://github.com/Plasma/BufferedNavigationController没有这个问题。但我不能在我的项目中使用它。

In the readme they say "To use, simply add the provided files to your project and change your UINavigationController class to inherit from BufferedNavigationController in Interface Builder." 在自述文件中,他们说“要使用,只需将提供的文件添加到项目中,并将UINavigationController类更改为继承自Interface Builder中的BufferedNavigationController。” But I don't understand how can i change inheritance in Interface Builder. 但我不明白如何在Interface Builder中更改继承。 I tried to do this in my code: 我试着在我的代码中这样做:

//Here is my custom NavController which is inherited BufferedNavigationController instead of UINavigationController

@interface CPNMenuController : BufferedNavigationController
   {
UITableView *menuPicker; .....

But nothing happened - as I see methods are called from standard UINavigationController. 但事情没有发生 - 因为我看到方法是从标准UINavigationController调用的。 I understand- it's a dummy question but nevertheless I'm new to iOS development and may be I don't understand something in README correctly or I did something wrong.I need a help with this. 我理解 - 这是一个虚拟的问题但是我是iOS开发的新手,可能是我在README中没有正确理解或者我做错了什么。我需要帮助。 Thanks in advance. 提前致谢。

In the Storyboard, select the UINavigationController that you want to change. 在Storyboard中,选择要更改的UINavigationController。 Open the Identity Inspector panel (3rd of the righthand sidepanels). 打开Identity Inspector面板(右侧边框的第3个)。 Under "Custom Class" you should be able to see BufferedNavigationController (or your subclass, CPNMenuController) in the list. 在“自定义类”下,您应该能够在列表中看到BufferedNavigationController(或您的子类,CPNMenuController)。 Select it. 选择它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM