I use the SWRevealViewController library to quickly release the slide menu, but I try to put that menu in the right direction. I saw this comment in the library description
// Optional right view controller, can be nil if not used @property (nonatomic) UIViewController *rightViewController;
but I am not familiar with objective C, and I cannot do it quickly. This is part of my code for the default menu (left):
class ViewController: UIViewController, AVAudioPlayerDelegate { @IBOutlet weak var playlistOutlet: UIBarButtonItem! override func viewDidLoad() { super.viewDidLoad() playlistOutlet.target = self.revealViewController() playlistOutlet.action = Selector("revealToggle:") self.view.addGestureRecognizer(self.revealViewController().panGestureRecognizer()) } }
And opensViewController is called from the SWRevealViewController library
ios objective-c swift swrevealviewcontroller
Ilir V. Gruda
source share