digitalleaves / dlhamburguermenu Goto Github PK
View Code? Open in Web Editor NEWA "hamburguer" sidebar menu written entirely in swift
A "hamburguer" sidebar menu written entirely in swift
Hello, I would like to know how can I completely deactivate the gesture recognizer, because I have one in my view and the one from the menu kinda overlays it and I can't use the one from my view. If there would be any way that I could just activate it in subviews, or deactivate for a sub view in particular it would be awesome too! I already tried putting false on the code to deactivate it but I still can't use mine :(
Thanks in advance! :)
No cocoapods support ?
When i click tableview indexpath.row, i want to push customviewcontroller. You wrote code for that one. But there appears MainviewController and then custom view controller displays. How to avoid that.
Thanks in advance
does it works with TabBarViewController ?
if so could you please provide an example of it
Thank you
While swiping the menu to the right direction , it is getting stretched to screen width, Issue is existing in the sample code also.
I am designing an app that has left and right swipe on the main page. So I want the menu to only appear on the main content page by press of a button or maybe swipe from the edge. Your example has the menu appearing if I swipe left to right anywhere on the screen. Any suggestion for a Newbie!
how can i use this library with tabbar ?
Is it possible to integrate the menu to a tab bar controller? I would like the menu to appear when the user taps one of the tab bar options.
Hi, I'm pretty new to iOS programming and I'm wondering how can you pass data to the next scene when clicking a table cell in the menu. In my case I want to set the text of the nav bar of the next scene to be the text of the cell that I just clicked. I figured I probably should do something in the following function but I'm not sure how.
func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) {
let nvc = self.mainNavigationController()
if let hamburguerViewController = self.findHamburguerViewController() {
hamburguerViewController.hideMenuViewControllerWithCompletion({ () -> Void in
nvc.visibleViewController.performSegueWithIdentifier(self.segues[indexPath.row], sender: nil)
hamburguerViewController.contentViewController = nvc
})
}
}
Here's what I have tried:
func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) {
let nvc = self.mainNavigationController()
if let hamburguerViewController = self.findHamburguerViewController() {
hamburguerViewController.hideMenuViewControllerWithCompletion({ () -> Void in
if let the_controller = nvc.visibleViewController as? TagPostViewController {
the_controller.siteURL = NSURL(string: "http://www.example.com")
nvc.visibleViewController.performSegueWithIdentifier("tags", sender: nil)
hamburguerViewController.contentViewController = nvc
}
})
}
}
This isn't really a bug/issue but can you update the project with a example where some data is being passed through the segue? I think it will really help newcomers like me.
Support swift 2?
A really great example.
I am trying to tweak it to match my need. Current example you provided shows Demo Main content ViewController
when DLHamburguerNavigationController
is loaded and Option1/2/3 View Controllers
are further pushed on Navigation Stack which results in back button like shown below.
What I am trying to do is get rid of Demo Main content ViewController
and directly load Option 1 View Controller on DLHamburguerNavigationController
(or setting it as a root view controller.) But real problem occurs when I try to go back to Option 1 from Option 2 via Menu as poptoRootViewController does not work. What I tried:
func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) {
let nvc = self.mainNavigationController()
println(indexPath.row)
if let hamburguerViewController = self.findHamburguerViewController() {
if (indexPath.row == 0){
//hamburguerViewController.hideMenuViewControllerWithCompletion(<#completion: ((Void) -> Void)?##(Void) -> Void#>)
hamburguerViewController.hideMenuViewControllerWithCompletion({ () -> Void in
nvc.popToRootViewControllerAnimated(true) // <--- Does not take me to Option 1.
})
}
else{
hamburguerViewController.hideMenuViewControllerWithCompletion({ () -> Void in
nvc.visibleViewController.performSegueWithIdentifier(self.segues[indexPath.row], sender: nil)
hamburguerViewController.contentViewController = nvc
})
}
}
}
I know this is something not really a correct way but I am thinking what shall I do to achieve this? Any hint towards correct solution would be appreciated. Thanks.
In my VC, HamburguerMenu gets opened for all swipe gestures no matter what the direction is. I suppose this is because it is being triggered by "pan" gestures, not swipe. Is there any particular reason to use pan instead of swipe?
This choice causes my table view's cells not to be editable by swiping to the left since the gesture triggers the menu instead. How can I overcome this?
is there any plan to swift 4 ?
The target “DLHamburguerMenu” contains source code developed with an earlier version of Swift. Choose “Convert” to update the source code in this target to the latest Swift syntax. This action can be performed later using “Convert to Latest Swift Syntax” in the Edit menu.
I want to replace Main menu container. On click of menu view controller.
hi, whenn i try to swipe my menu controller i'm facing this error
[.DLHamburguerContainerViewController panGestureRecognized:]: unrecognized selector sent to instance 0x7f9265c0c8a0
kindly check and do needfully
Hi,
Thanks for the wonderful side menu. It works like charm. Could you please add it to cocoa Pods , would be easy to maintain.
Thanks
Steps to reproduce:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.