We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 5650d63 + df34176 commit 304ec5cCopy full SHA for 304ec5c
PagingKit/PagingMenuView.swift
@@ -421,7 +421,7 @@ open class PagingMenuView: UIScrollView {
421
focusView.center = CGPoint(x: centerPointX, y: center.y)
422
423
let expectedIndex = (focusView.center.x < leftFrame.maxX) ? index : rightIndex
424
- focusView.selectedIndex = min(expectedIndex, numberOfItem - 1)
+ focusView.selectedIndex = max(0, min(expectedIndex, numberOfItem - 1))
425
426
contentOffset = CGPoint(x: normaizedOffsetX, y:0)
427
0 commit comments