Code Monkey home page Code Monkey logo

sidemenu's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sidemenu's Issues

menuWidth

Hi,

simple and really cool menu you did here. I have just one question. Is it correct that you can't have different menuWidth for left and right controller?

Best,
Lars

Having problem with split view controller

When attempting to push a view from the sideBarTableView controller, there is an error

SideMenu Warning: cannot push a ViewController from a ViewController without a NavigationController. It will be presented it instead.

attached a sample setup below

screen shot 2016-07-20 at 2 51 15 pm

*** IMPORTANT: PLEASE READ BEFORE YOU OPEN A NEW ISSUE! ***

Thank you for your interest in SideMenu!

I have received a surprising amount of questions about SideMenu since putting it up here. A few people in the community have identified some problems and helped contribute to SideMenu to make it better for everyone and I'm truly grateful for the support! Keep them coming!

I have also received a number of questions about people having issues implementing SideMenu, mostly from beginners learning how to code. As much as I would love to help all of you, I simply do not have the time to teach you. That's why I spent a lot of time putting together a detailed README, adding comments about usage in code, and providing a demo project. These will give you all the information you need to work through any problem and also save me the time it takes to personally respond. It is faster for you to figure it out for yourself instead of waiting for me to respond to you.

If your question begins with "How do I..."

  • It's not a bug. Stay persistent, try a few different things, and you will figure it out! I also recommend searching and posting your questions on stackoverflow.com. Or, if you're interested in hiring me to teach you, please email me using the email address listed at the bottom of my README.

If your question begins with "Can I..."

  • That's a new feature request. I am no longer investing my personal time to implement one-off features because SideMenu currently meets the majority of people's needs with the features it already has. However, this is a great opportunity for you to contribute to this open source project! Feel free to open an issue to ask any clarifying questions for your new feature before you start building. Open a pull request when you're ready for me to merge it.

Again, please do not email me or open any issues if you want to know how to use SideMenu or are having trouble getting it to work. However, if you think you found a bug, open an issue and I will respond to it as quickly as I can. You should be able to demonstrate the bug in the demo project which has a minimal amount of code.

Thanks again for your support and for being respectful of my time.

hide navigation bar in sidemenu table

Hi,
Your side menu is great. But when I create a tableview to implement side menu, it has a navigation bar on top. How could I remove it for my sidemenu looks better ?

Call Side Menu in Each Child View Controller

Hi jonkykong, your side menu is awesome, looks really smooth and responsive. My purpose is to build a menu similar to that of Lyft or Uber: each child view controller should be able to call this menu independently without a intermediate step to go back to "home" screen. In your example, each child view controller is triggered by a push segue but then the menu button just redirects me to the main screen instead of the menu. In my own code, I used
presentViewController(SideMenuManager.menuLeftNavigationController!, animated: true, completion: nil)
for the menu button but the automatic generated "back" button will always should on the top of my menu button to prevent me from doing the right thing and then I will go back to the initial screen... Is there any neat way to make your menu behave like a normal slide-out menu?

Wrong MainViewController frame after rotation

If we rotate device while SideMenu is on screen with MenuPresentMode equals to InOut & MenuTransformScaleFactor equals to less than 1 we'll catch a bug: MainViewController will be cut out his height.

How to open side menu programmatically?

Hello. Thank you for library.

Can not understand what the correct way to open side menu from code.

Tried use some segue from root view controller and performSegueWithIdentifier(_:_:) but menu just opened modally.

Thanks in advance.

Crash on multiple left side controller menu

SideMenuManager.menuLeftNavigationController = Table 1 .. Dashboard 1

SideMenuManager.menuLeftNavigationController = Table 2 .. Dashboard 2

Crash..

I have used following to avoid above error!

INSTEAD OF using this -
presentViewController(SideMenuManager.menuLeftNavigationController!, animated: true, completion: nil)
I have used this -
performSegueWithIdentifier("segue_menu_controller", sender: self)

black screen when open sidemenu

When i click UIBarButton side menu appears black. I did not changed any default settings. Where am i wrong? Can you help me with that issue? I am new with swift. Thank you in advance!

Visual glitch when sliding to close

Hi!

There's a visual glitch when you close either one of the side menus by swiping as if you were throwing the menu way. In other words, beginning the swipe and releasing the finger before the menu is fully closed.

Swift 3 (Xcode Beta 5) support

@jonkykong thanks for creating a very nice/handy class. I have tried it and works just fine, but is not working properly for Swift 3 projects.
I did a quick test using the suggested migration (via Xcode) and managed to get it running, but got some bugs (not displaying the menu as it suppose to) and other issues.

The key part is, are you working on the Swift 3 version? Or should I fix it myself and do a Pull Request?

Populate Sidemenu Programatically

@jonkykong first of all, thanks so much for this great library!

I was just wondering how to populate the side menu table view controller from a swift array. Where should the datasouce/ delegate be placed so that the different options can appear in the side menu?

Thanks!

Compatibility with XCode 8

I love SideMenu but when I included it in XCode 8 (announced in WWDC2016) using Cocoapods (use_frameworks), it reported an error, saying that the framework was compiled with an earlier version of compiler. Can you provide one compiled with XCode 8?

Application crashes after touch home button

Application crashes for me after touching home button.In SideMenuTransition.hideMenuStart() SideMenuTransition.viewControllerForPresentedMenu! controller is nil.
My init looks like:

 let leftViewController:UISideMenuNavigationController = UIStoryboard(name: "Main", bundle: nil).instantiateViewControllerWithIdentifier("UISideMenuNavigationController") as! UISideMenuNavigationController
         SideMenuManager.menuLeftNavigationController = leftViewController
        SideMenuManager.menuAddScreenEdgePanGesturesToPresent(toView: self.view)
        SideMenuManager.menuPresentMode = .MenuSlideIn
        SideMenuManager.menuAnimationBackgroundColor = UIColor.clearColor()

Transition with disabled rotation/limited supported orientation

Steps to reproduce:

For easy demonstration, I'm using example project in SideMenu directory.

  • Open Example/SideMenu.xcworkspace
  • Create new subclass of UINavigationController
  • Set Initial Navigation Controller in Main.storyboard as type of this new subclass
  • Add this code to new created subclass of UINavigationController (This should simulate use case for programmatically set up rotation lock or different supported interface orientations for different devices e.g. iPhone only Portrait, for iPad Portrait and Landscape)
    override func shouldAutorotate() -> Bool {
        return false
    }
  • Launch Example in Simulator
  • Press CMD + Left Arrow
  • Open Menu

What happens

screen shot 2016-05-17 at 21 10 53

#### Expected behaviour

Transition will respect current orientation of Initial Navigation Controller

fatal error: unexpectedly found nil while unwrapping an Optional value

I have successfully implemented SideMenu by following the steps in the GitHub page. It's Working fine. But amGetting this error right now. So When It occurred...

I have Different items to display in my Menu list like , Home , Profile , Log Out etc..
for that I am using different cells and created segue's from each cell . The First Screen to Display when i run the project is the Home Screen. Then using a Button or gesture I revealed the SideMenu and from the Items in the Menu when I click on the Cell which Navigates back to home I get the error mentioned in the title inside the function hideMenuStart at this line
let mainViewController = SideMenuTransition.viewControllerForPresentedMenu! ... How to fix this.. I am new to iOS...

Informs when Side Menu start presenting menu and end presenting menu

Hi, do you think it is possible to add in a delegate, to inform the view controllers about when it will start presenting the side menu, and also when the side menu has been completely presented? Same goes to when closing the side menu. It would be help if that's added. Many thanks.

when useing "QLPreviewController" with SideMenu...

it can't touch right part to shutdown SideMenu.

当使用QLPreviewController放在我的Controller里时,拉出SideMenu,不能点击右侧遮罩处关闭SideMenu。因为能直接操作QLPreviewController。

Black Strip Top

2016-07-19 8 13 20

2016-07-19 8 13 08

I use the method in Storyboard but it has that small black area that disturbs me and I don't know how to get rid of it. I have also tried your programmatically implementing method which gives the same result. Is it a common issue?

Problems with iPad and iPhone 4s

Hello,
Congratulations on your work, works fine for iPhone 5+, but fot iPad and iPhone 4s when I am using at landscape the menu doesn't get the right size, neither the main view controller.
If you can help me solve this, or give tips where I can correct it myself I will be very happy.

Kind Regards

BackgroundImage Fit

SideMenuManager.menuAnimationBackgroundColor = UIColor(patternImage: UIImage(named: "stars")!)

how to make it fit on the screen?

fatal error: unexpectedly found nil while unwrapping an Optional value rotating device

Hi,
i'm very glad to use SideMenu, it looks fantastic!

During testing of my app, the line in presentMenuStart func:
let mainViewController = SideMenuTransition.viewControllerForPresentedMenu!

Cause an EXC_BAD_INSTRUCTION error when i rotate the device. Looking at issues, i tried to update pod and to init menu in AppDelegate without solving the problem.

Thanks

Dim presenting view when menu is showing

When the menu is shown, I want to dim the presenting view by changing its background color. I am happy to submit a PR for this. There are two ways we could do this:

  • Add a property like menuContainerBackgroundColor property to SideMenuManager. Then it would handle the presenting view background color change as part of its animation.
  • Add a delegate to SideMenuManager. It would call a method in the delegate when it is presented or dismissed. This allows us to animate the background color changes by responding to the delegate methods and animating using menuAnimationPresentDuration or menuAnimationDismissDuration for the duration.

Any preference?

Error! Please, help

In my project there is following hierarchy:

vc - viewController
nc - navigationController
sm - sideMenu

nc1 - vc1 - ncSM - vcSM - nc2 - vc2

when call "presentViewController(SideMenuManager.menuLeftNavigationController!, animated: true, completion: nil)" from vc2, there is following error:

Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Application tried to present modally an active controller <____: 0x7fa0148a7400>

how can I solve the problem?

Passing Data

Hi jonkykong,

Do you have documentation on how to pass data between the SideMenu and the MainView?

Sample without Storyboard

Hey, great work with this menu!
I have a project without storyboard, so I cant use segues. I did manage to make it work using pushViewController but the first time I click the cell on the menu the push fails, on the second time and afters it works just fine.
Maybe I set something wrong and after the first click your code fix it. Can you Make a sample without a storyboard?

Thanks

Present View Controller from side menu

What is the appropriate way to present a view controller from the menu when a row is selected (using TableViewController? Right now I am pushing modally (cover up presentation) based on the selected row, but I'd prefer it to just change whatever controller that was pushed to the side when the menu is displayed and then hide the menu when the row is selected.

Does that make sense?

How to properly make a push segue from the SideMenu

Hello,

Thank you for this ready-to-use pod !

I am displaying a static table view in the sidemenu. I would like to perform a push segue from a cell of the SideMenu.

How and where can I implement a Navigation Controller to perform a push segue ?

Thanks !

Here is my code :

override func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) {
    let cell = tableView.cellForRowAtIndexPath(indexPath)

    // get cell identifier if it exists (otherwise, quit the function)
    guard let cellIdentifier = cell?.reuseIdentifier else {return}

    switch cellIdentifier {


    case "settings":
        performSegueWithIdentifier("SettingsSegue", sender: self)

    case "help":
        if let url = NSURL(string: "http://www.google.com/") {
            UIApplication.sharedApplication().openURL(url)
        }

    case "signout":
            performSegueWithIdentifier("SignInSegue", sender: self)

    case "deleteaccount":
            performSegueWithIdentifier("SignInSegue", sender: self)

    default: break

    }
 }

Dismiss left view

How can I dismiss my left view without poping or pushing my main view controller?

barPosition Error

When I make click on the bottom for display the menu, show me the following error:

Failed to set (barPosition) user defined inspected property on (UINavigationItem): [<UINavigationItem 0x13dd98d60> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key barPosition.

Any Help?

Set content of the menu programmatically

        let menuLeftNavigationController = UISideMenuNavigationController(rootViewController: SideMenuViewController())
        menuLeftNavigationController.leftSide = true
        // UISideMenuNavigationController is a subclass of UINavigationController, so do any additional configuration of it here like setting its viewControllers.
        SideMenuManager.menuLeftNavigationController = menuLeftNavigationController

The code above let me open the side menu, but its empty. It should have root controller = SideMenuViewController(). It never loaded.

I tested SideMenuViewController and it display just fine anywhere else.

Pod Spec Missing

I'm trying to install via Cocoapods and keep getting this: "Unable to find a specification for SideMenu (~> 1.1)" after running pod install. I have no issues installing other cocoa pod frameworks, not sure why it can't find it! I've tried running both: pod 'SideMenu' and pod 'SideMenu', '~> 1.1'

Don't use OverFullScreen in modalPresentationStyle

The modalPresentationStyle configured with OverFullScreen cause window hierarchy when present another viewController over this.

Replace all .OverFullScreen to .OverCurrentContext to fix it.

Thanks. :-)

Functionality in landscape mode?

Hey,

The SideMenu has been working great. I have a tableView with static cells for my sidemenu, however, when I'm in landscape mode the menu doesn't scroll so the bottom part is inaccessible. I know the entire menu won't fit on screen in landscape but do you have a recommendation on how to make it so it will scroll in landscape?

Thanks!

Setting Swipe Gestures to Nil Doesn't Disable Swipe Gesture

        conversationsViewController.conversationsViewControllerDelegate = self
        SideMenuManager.menuLeftNavigationController = conversationsViewController
        SideMenuManager.menuPresentMode = .ViewSlideInOut
        SideMenuManager.menuFadeStatusBar = false
        SideMenuManager.menuWidth = max(round(min(UIScreen.mainScreen().bounds.width, UIScreen.mainScreen().bounds.height) * 0.85), 240)
        SideMenuManager.menuShadowOpacity = 0
        SideMenuManager.menuRightSwipeToDismissGesture = nil
        SideMenuManager.menuLeftSwipeToDismissGesture = nil
        SideMenuManager.menuAnimationPresentDuration = 0.25
        SideMenuManager.menuAnimationDismissDuration = 0.25

As you can see I've set both swipe gestures to nil however, I'm still able to swipe and dismiss the controller. What am I doing wrong?

Unable to install using cocoapods

screen shot 2016-04-11 at 2 21 25 pm

I am unable to install the lib, using cocoapods in terminal it shows version no. 1.1.4 ....
Although the previous version which I do have SideMenu (1.0.3) is running successfully . Please have a look into this is there any issue with the lib .

Crash if touch during swipe

Hello,

I fell into a crash/bug in the example demo.
When you swipe on the left edge, if you are in middle of swiping (= do not release your finger) then clicking (once or repeatedly) on a cell in the table ("Push View Controller 1"), the app simply freezes after releasing any touch.

More clearly :

  1. Swipe left with your right finger and do not release it
  2. Touch "Push View Controller 1" cell with your left finger
  3. Release your right finger

The app is frozen !

Can you investigate this problem ?

Thank you !

TabbarController使用出现Warning

I use sidemenu in the tabbarcontroller, when i click the tablecell in the sidemenu, the console display "warning:attempting to push a viewcontroller from a viewcontroller that doesn't have a NavigationController...."

发现在iOS8中的bug

在iOS8中,menuAddScreenEdgePanGesturesToPresent 设置左边手势,没效果,如果用menuAddPanGestureToPresent,则滑到右边缘再离开屏幕(或关闭的时候左滑到左边缘),会闪一下屏,具体表现为:快速关掉测滑页,然后马上再打开测滑页。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.