在SWRevealViewController
来电revealToggle:
(菜单)需要:
someButton.addTarget(self.revealViewController(), action: Selector("revealToggle:"), forControlEvents: UIControlEvents.TouchUpInside)
self.view.addGestureRecognizer(self.revealViewController().panGestureRecognizer())
self.view.addGestureRecognizer(self.revealViewController().tapGestureRecognizer())
但是只有按下按钮(TouchUpInside
)才能正常工作。我该怎么称呼它?显示viewDidLoad
时只需view
答案 0 :(得分:1)
self.revealViewController.revealToggle()