I have an ImageView
added to UIView
. Tapping on the image take to Segmented Control
which is also part of same UIView
. I am trying to add swipe gestures to this segmented control.
Tried following.
override func viewDidLoad() {
super.viewDidLoad()
let rightSwipe = UISwipeGestureRecognizer(target: SegmentCotroller, action: Selector("swiped:"))
rightSwipe.direction = .Right
self.SegmentCotroller.addGestureRecognizer(rightSwipe)
}
func swiped(sender:UIGestureRecognizer){
print("Swiped.....!")
}
Code never reaches to swiped method when swiping right.
Any help is appreciated! Thanks