Remove an redundant type cast.

This commit is contained in:
WenchaoD 2018-10-11 10:51:13 +08:00
parent a7a57e2edd
commit 3711f2998d
1 changed files with 1 additions and 1 deletions

View File

@ -205,7 +205,7 @@ open class FSPagerView: UIView,UICollectionViewDataSource,UICollectionViewDelega
open var scrollOffset: CGFloat {
let contentOffset = max(self.collectionView.contentOffset.x, self.collectionView.contentOffset.y)
let scrollOffset = Double(contentOffset/self.collectionViewLayout.itemSpacing)
return fmod(CGFloat(scrollOffset), CGFloat(Double(self.numberOfItems)))
return fmod(CGFloat(scrollOffset), CGFloat(self.numberOfItems))
}
/// The underlying gesture recognizer for pan gestures.