1

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显示

4

1 回答 1

1
self.revealViewController.revealToggle()
于 2014-09-25T14:08:50.067 回答