Using SWRevealViewController, I made a slide view which appears from the right. It is supposed to be triggered by clicking a certain button on the navigation bar or sliding the screen right to left.
The view which appears is displayed in the center of the screenshot.
The problem is that it works only when slid to left, not the button clicked. The following is the code working with the sliding view, which is written in the UIViewController class for the view controller on the right in the screenshot.
The variable 'listBarBtn' is liked to the button with an image of three horizontal lines, a UIBarButtonItem in the right top of the same view.
listBarBtn.target = self.revealViewController()
listBarBtn.action =
#selector(SWRevealViewController.rightRevealToggle(_:))
self.revealViewController().rightViewRevealWidth = 293
self.view.addGestureRecognizer(self.revealViewController().panGestureRecognizer())
The second line was like the following one at first; I was suggested to change it by the compiler.
listBarBtn.action = Selector("rightRevealToggle:")
And here are the identifiers of the arrows between views:
Reveal View Controller->Vc imozomo Slide: sw_right (reveal view controller set view controller)
Reveal View Controller->Vc info Navigation: sw_front (reveal view controller set view controller)
Vc imozomo Slide->the view on the right with title in korean: myPage(reveal view controller push view controller. In a test project this did not require any identifier but prompted a warning message saying I need one)
Is there any code I have missed?