Skip to content

Commit

Permalink
fix indexOfIndexPath(_ indexPath:) mothed
Browse files Browse the repository at this point in the history
  • Loading branch information
Coder-TanJX committed Mar 12, 2020
1 parent a02664e commit f08b0e6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion JXBanner.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

Pod::Spec.new do |s|
s.name = 'JXBanner'
s.version = '0.3.0'
s.version = '0.3.1'
s.summary = 'A multifunctional framework for banner unlimited rollover diagrams'

# This description is used to generate tags and improve search results.
Expand Down
2 changes: 1 addition & 1 deletion JXBanner/Classes/Banner/Banner/JXBanner.swift
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,6 @@ UICollectionViewDelegate {

func indexOfIndexPath(_ indexPath : IndexPath)
-> Int {
return Int(indexPath.item % pageCount)
return pageCount > 0 ? Int(indexPath.item % pageCount) : 0
}
}

0 comments on commit f08b0e6

Please sign in to comment.