iDevelopper / PBRevealViewController

A UIViewController subclass for revealing a left and/or right view controller above or below a main view controller.
MIT License
80 stars 16 forks source link

Swift version #31

Closed iDevelopper closed 7 years ago

iDevelopper commented 7 years ago

The Swift version of this library is now on line! Please feel free to PR, Fork, etc... And please tell me when you use this controller in your project !

RFyre00 commented 7 years ago

I integrated side menu at left on a tabbarview controller and when swiping to close the menu tabs also gets swiped. I am a rookie on this so please do help me out on how to disable swipe while menu is on top. Thank you.

iDevelopper commented 7 years ago

No sure to understand, can you upload your storyboard?

RFyre00 commented 7 years ago

I mean both gesture recognizer of PBRevealController and SwipeableTabBarController are working at the same time. I want to disable the background user interaction while the side menu is open and on the top.

iDevelopper commented 7 years ago

Ok,

Use the delegate functions:

    func revealController(_ revealController: PBRevealViewController, willShowLeft viewController: UIViewController)
    {
        revealController.mainViewController?.view.isUserInteractionEnabled = false
    }

    func revealController(_ revealController: PBRevealViewController, willHideLeft viewController: UIViewController)
    {
        revealController.mainViewController?.view.isUserInteractionEnabled = true
    }
RFyre00 commented 7 years ago

thank you brother :)