kitasuke / PagingMenuController

Paging view controller with customizable menu in Swift
MIT License
2.5k stars 449 forks source link

Hope to be able to join the system has the function of the slide of the return #372

Open ReverseScale opened 6 years ago

ReverseScale commented 6 years ago

I found that by default, cannot use the system at the same time in the open sliding switch the slide of the return, and this function has a lot of user habit, so I try to use this method and I do not know if this is correct:

//
//  PagingViewController.swift
//  PagingMenuController
//
//  Created by Yusuke Kita on 6/3/16.
//  Copyright (c) 2016 kitasuke. All rights reserved.
//
...
    open override func viewWillAppear(_ animated: Bool) {
        super.viewWillAppear(animated)
        contentScrollView.panGestureRecognizer.require(toFail: navigationController?.interactivePopGestureRecognizer ?? UIGestureRecognizer())
        navigationController?.interactivePopGestureRecognizer?.require(toFail: navigationController?.interactivePopGestureRecognizer ?? UIGestureRecognizer())
    }
...