DroidsOnRoids / SwiftCarousel

Lightweight, written natively in Swift, circular UIScrollView.
http://www.thedroidsonroids.com/blog/ios/circular-scroll-view-swiftcarousel/
MIT License
144 stars 43 forks source link

New error type for item being out of bounds. #29

Open sunshinejr opened 8 years ago

sunshinejr commented 8 years ago

When we are using selectItem() method or when we use the new property scrollType with option .Max(UInt) (when #28 gets merged), we can pass wrong item number. In that case we should unify the handling and I suggest adding new ErrorType to our SwiftCarouselError type, something like BadNumberOfItems.