Skip to content

Commit 24e4f7b

Browse files
authored
Merge pull request #15 from xusion/master
修复选择tab逻辑问题:过滤索引为负数或越界
2 parents bb91f8b + 6264862 commit 24e4f7b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

LLSegmentViewController/LLSegmentViewController/LLSegmentViewController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ extension LLSegmentViewController{
161161
}
162162

163163
open func selected(at Index:NSInteger,animation:Bool) {
164-
guard (ctls.count < Index && Index > 0) else {
164+
guard (ctls.count > Index && Index >= 0) else {
165165
return
166166
}
167167
segmentCtlView.selected(at: Index, animation: animation)

0 commit comments

Comments
 (0)