Skip to content

Commit c9d5bea

Browse files
author
Marco Abundo
committed
Ugh
1 parent 5691726 commit c9d5bea

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

SLTDoubleTapSegmentedControl/SLTDoubleTapSegmentedControl.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,10 @@ public class SLTDoubleTapSegmentedControl: UISegmentedControl {
5858

5959
// MARK: Custom touch handling
6060

61-
override public func touchesEnded(_ touches: Set<UITouch>, with event: UIEvent?) {
62-
let previousSelectedSegmentIndex = selectedSegmentIndex
61+
override public func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) {
62+
let previousSelectedSegmentIndex = selectedSegmentIndex
6363

64-
super.touchesEnded(touches, with: event)
64+
super.touchesBegan(touches, with: event)
6565

6666
if previousSelectedSegmentIndex == selectedSegmentIndex {
6767
// Clear the segmented control

0 commit comments

Comments
 (0)