简体   繁体   中英

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.

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." But I don't understand how can i change inheritance in 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. 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. Thanks in advance.

In the Storyboard, select the UINavigationController that you want to change. Open the Identity Inspector panel (3rd of the righthand sidepanels). Under "Custom Class" you should be able to see BufferedNavigationController (or your subclass, CPNMenuController) in the list. Select it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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