I have problems when using SWRevealViewController and scrollview. I created sidebar menu follow the instructions below (Swift 2.0 & XCode 7.): Sidebar Menu Tutorial Swift 2.0
You see the following picture:
SWRevealViewController conflict UIScrollView
How to handler it?. Any help would be appreciated, Thank.
The following is my code:
@IBOutlet weak var scrollView: UIScrollView!
@IBOutlet weak var menuButton: UIBarButtonItem!
override func viewDidLoad() {
super.viewDidLoad()
//revealViewController().delegate = self
//self.scrollView.delegate = self
// Do any additional setup after loading the view.
let vc0 = FSMainSwipeVC(nibName: "FSMainSwipeVC", bundle: nil)
self.addChildViewController(vc0)
self.scrollView.addSubview(vc0.view)
vc0.didMoveToParentViewController(self)
//----
let vc1 = FSDetailSwipeVC(nibName: "FSDetailSwipeVC", bundle:nil)
var frame1 = vc1.view.frame
frame1.origin.x = self.view.frame.size.width
vc1.view.frame = frame1
self.addChildViewController(vc1)
self.scrollView.addSubview(vc1.view)
vc1.didMoveToParentViewController(self)
self.scrollView.contentSize = CGSizeMake(self.view.frame.size.width * 2, self.view.frame.size.height - 66);
// Do any additional setup after loading the view.
if self.revealViewController() != nil {
menuButton.target = self.revealViewController()
menuButton.action = "revealToggle:"
self.view.addGestureRecognizer(self.revealViewController().panGestureRecognizer())
}
}