Skip to content

Commit fff452f

Browse files
committed
Panning FUISwitch should base on/off on maxOffset, not frame width
1 parent 1e017e0 commit fff452f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Classes/ios/FUISwitch.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ - (void) panned:(UIPanGestureRecognizer *)gestureRecognizer {
140140

141141
}
142142
else if (gestureRecognizer.state == UIGestureRecognizerStateEnded) {
143-
BOOL left = newOffset.x > self.frame.size.width / 2;
143+
BOOL left = newOffset.x > maxOffset / 2;
144144
[self setOn:(!left) animated:YES];
145145
}
146146

0 commit comments

Comments
 (0)