New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to use folding tab bar on none root view controller? #18
Comments
I was stuck on this for a bit but this is how I got it to work: First, in your main storyboard, make a new UITabBarController. Next, add a new Cocoa Touch Class file to your project and make sure it is a subclass of YALFoldingTabBarController. Whatever you end up naming it, go back to the main storyboard and set the class name of the UITabBarController you made earlier to the name you gave to the Cocoa Touch Class file you created. Next, in the new class file you made in the viewDidLoad function, you would set up all the same things you see in the AppDelegate file in the example provided by Yalantis minus this statement: YALFoldingTabBarController *tabBarController = (YALFoldingTabBarController *) self.window.rootViewController; Then, everytime you see tabBarController used, you would simple use "super" instead. This worked for me using swift so the SampleFoldingTabBarController.swift file (which is the custom Cocoa Touch Class I made) looks something like this:
|
@MarceloPrado Have you tried the solution above? Do you need some help? |
It works!!! Thanks |
It works! But I also want to handle touches on extra tabBarItems in the items page. So far, no successes after 2 days... `import Foundation class ViewControllerHome: UIViewController,UITextFieldDelegate,YALTabBarInteracting,YALTabBarViewDelegate {
}` |
Ok, i got it. |
@LiveRock Can you give some guidance how you did this? |
First, you need to conform to the protocol YALTabBarInteracting // MARK: YALTabBarInteracting protocol I couldn't get it to work initially because I did not implement it properly like: |
I am ios developer.. |
i want implement for swift, some people can help me? |
Hello, how are you doing today?
I'm trying to set YALFoldingTabBarController on specific view controller inside App Delegate, but it doesn't work (tab bar doesn't show up). It is possible to use this tab bar outside root view controller? How?
Thanks!
The text was updated successfully, but these errors were encountered: