这是我右侧滑动菜单的代码
if revealViewController() != nil {
revealViewController().rearViewRevealWidth = 62
menuButton.target = revealViewController()
menuButton.action = #selector(SWRevealViewController.revealToggle(_:))
revealViewController().rightViewRevealWidth = 150
view.addGestureRecognizer(self.revealViewController().panGestureRecognizer())
}