Comments (4)
As indicated by the error statement, self.navigationController!.parent?.parent
is not a KYDrawerController
type.
Please understand viewcontroller hierarchy.
https://developer.apple.com/library/content/featuredarticles/ViewControllerPGforiPhoneOS/TheViewControllerHierarchy.html#//apple_ref/doc/uid/TP40007457-CH33-SW1
from kydrawercontroller.
I don't think it's about the hierarchy, because i had it this way since swift 2.2 and now that it was updated and you said in the ticket #57, that we need to set module column, now it breaks
because if I print this line self.navigationController!.parent?.parent i get Optional(KYDrawerController.KYDrawerController: 0x7fc0add0b270)
so it's module.class and the error Could not cast value of type 'KYDrawerController.KYDrawerController' to 'renti.KYDrawerController' , so it´s a casting problem between that.
from kydrawercontroller.
It will work without problems in this sample code.
Please check the implementation or configuration!
Sample.zip
from kydrawercontroller.
viewController hierarchy is wrong!!
@IBAction func buttonDidTap(_ sender: UIButton) {
let drawer = tabBarController?.parent as! KYDrawerController
drawer.setDrawerState(.opened, animated: true)
}
Here is not the place to ask questions. It is the place to report the issue!!
First of all, please check the cause of the problem on their own.
https://medium.com/@methane/why-you-must-not-ask-questions-on-github-issues-51d741d83fde
from kydrawercontroller.
Related Issues (20)
- Top most view controller ?
- swift4.2 HOT 2
- Getting black screen of main controller HOT 7
- How can i push other viewcontroller in drawercontroller? HOT 4
- Drawer won't reset to top
- KYDrawerController configure with only one tab of UITabController
- KYDrawerController's side menu no response when clicked from widget(today extension)
- Drawer View is not opening,When coming from another screen HOT 3
- It just makes my content black and top bar gray HOT 1
- Update to Swift 5.0 HOT 2
- How to disable pan gesture HOT 3
- Without storyboard
- Cannot invoke didSelectRow or canMoveRowAt in drawer viewController
- Pan Gesture has stopped working HOT 2
- preferredStatusBarStyle from child view controllers not working.
- how to stop refreshing my Home controller?
- Upgrade to latest swift version and support for SPM
- UITableView Layout issue HOT 1
- Navigating to a ViewController from AppDelegate
- UITableView layout issue.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kydrawercontroller.