ios - SWRevealViewController - How can I make the menu disappear with a tap and/or swipe on FrontViewController -


i developing locator map. how can make menu disappear tap and/or swipe on frontviewcontroller. front view controller map (google map).

you can enable use of swipe gestures close menu in swrevealviewcontroller adding pan gesture recognizer view in viewdidload: of view controller.

override func viewdidload()  {     super.viewdidload()                      view.addgesturerecognizer(myrevealviewcontroller.pangesturerecognizer()) } 

getting menu respond taps requires handling tap action separately tap gesture recognizer.

for example, tap gesture recognizer defined , added view like

mytapgesturerecognizer = uitapgesturerecognizer(target: self, action: "closemenu") view.addgesturerecognizer(mytapgesturerecognizer) 

you close menu function using:

func closemenu() {           myrevealviewcontroller?.setfrontviewposition(frontviewposition.left, animated: true) } 

where .left frontviewposition dependent on how have view controllers configured swrevealviewcontroller.


Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -