Skip to content

Commit

Permalink
Merge pull request #103 from kumabook/focusview_selected_index
Browse files Browse the repository at this point in the history
focusView.selectedIndex should be `> 0`
  • Loading branch information
kazuhiro4949 authored Oct 13, 2019
2 parents 5650d63 + df34176 commit 304ec5c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion PagingKit/PagingMenuView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ open class PagingMenuView: UIScrollView {
focusView.center = CGPoint(x: centerPointX, y: center.y)

let expectedIndex = (focusView.center.x < leftFrame.maxX) ? index : rightIndex
focusView.selectedIndex = min(expectedIndex, numberOfItem - 1)
focusView.selectedIndex = max(0, min(expectedIndex, numberOfItem - 1))

contentOffset = CGPoint(x: normaizedOffsetX, y:0)

Expand Down

0 comments on commit 304ec5c

Please sign in to comment.