Reputation: 353
I'm trying to learn Swift. I want to make side menu in swift. I'd google and found some peace of code. I'm using Xcode 7.2 and swift version 2.1.1?
Error is showing in these following line :-
self.panRecognizer = UIPanGestureRecognizer(target: self, action: #selector(ENSideMenu.handleGesture(_:)))// (Expected , separator)
HandleGesture method is :-
internal func handleGesture(gesture: UISwipeGestureRecognizer) {
toggleMenu((self.menuPosition == .Right && gesture.direction == .Left)
|| (self.menuPosition == .Left && gesture.direction == .Right))
}
what should i do?
Thanks in Advance.
Upvotes: 2
Views: 1156
Reputation: 7013
try with old syntax
self.panRecognizer = UIPanGestureRecognizer(target: self, action: Selector("handleGesture:"))
Upvotes: 1