Merge pull request #3 from thr1llseek3r/master
Fix scrollToItem forces crash add debugPrint
This commit is contained in:
commit
795308668c
|
|
@ -500,7 +500,7 @@ open class FSPagerView: UIView,UICollectionViewDataSource,UICollectionViewDelega
|
||||||
@objc(scrollToItemAtIndex:animated:)
|
@objc(scrollToItemAtIndex:animated:)
|
||||||
open func scrollToItem(at index: Int, animated: Bool) {
|
open func scrollToItem(at index: Int, animated: Bool) {
|
||||||
guard index < self.numberOfItems else {
|
guard index < self.numberOfItems else {
|
||||||
assertionFailure("index \(index) is out of range [0...\(self.numberOfItems-1)]")
|
debugPrint("index \(index) is out of range [0...\(self.numberOfItems-1)]")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
let indexPath = { () -> IndexPath in
|
let indexPath = { () -> IndexPath in
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue