SWRevealViewController button not work after clicking Back button from another ViewController in Swift

前端 未结 1 1711
暗喜
暗喜 2020-12-12 05:37

I use SWRevealViewController for my project.
My problem is that I can click on the SWRevealView Toggle button at first time and that button does not

相关标签:
1条回答
  • 2020-12-12 05:57

    On click event of image view in serviceViewController,

    let detailVC = self.storyboard?.instantiateViewController(withIdentifier: "Detail") as! DetailVc
        self.navigationController?.pushViewController(detailVC, animated: true)
    

    Attach a navigation controller to detail viewcontroller. No need for manual connection between service and detail. Add a barbutton for goingback event.

     self.navigationController?.popViewController(animated: true)
    

    Also add self.view.addGestureRecognizer(self.revealViewController().panGestureRecognizer()) instead of ur code in the lastline of adding target for menubutton.

    Check whether this works.

    0 讨论(0)
提交回复
热议问题