This is a Xamarin iOS Binding for the iCarousel library.
A simple, highly customisable, data-driven 3D carousel for iOS.
- Install NuGet package.
- Add the iCarousel to your layout:
var carousel = new iCarousel
{
Bounds = View.Bounds,
ContentMode = UIViewContentMode.Center,
Type = iCarouselType.CoverFlow2,
Frame = View.Frame,
CenterItemWhenSelected = true,
DataSource = new SimpleDataSource(items),
Delegate = new SimpleDelegate(this)
};
View.AddSubview(carousel);
ViewDidLayoutSubviews();
- Open the sample project for a detailed working example.
When overriding one of the following methods from iCarouselDataSource
and iCarouselDelegate
, you must remove the base.xxx() call or it will throw Foundation.You_Should_Not_Call_base_In_This_Method
.
This is due a requirement from optional objective C methods implemented in C#.
iCarousel supports the following built-in display types:
- iCarouselTypeLinear
- iCarouselTypeRotary
- iCarouselTypeInvertedRotary
- iCarouselTypeCylinder
- iCarouselTypeInvertedCylinder
- iCarouselTypeWheel
- iCarouselTypeInvertedWheel
- iCarouselTypeCoverFlow
- iCarouselTypeCoverFlow2
- iCarouselTypeTimeMachine
- iCarouselTypeInvertedTimeMachine
- iCarouselDataSource
- NumberOfPlaceholdersInCarousel
- PlaceholderViewAtIndex
- iCarouselDelegate
- CarouselWillBeginScrollingAnimation
- CarouselDidEndScrollingAnimation
- CarouselDidScroll
- CarouselCurrentItemIndexDidChange
- CarouselWillBeginDragging
- CarouselDidEndDragging
- CarouselWillBeginDecelerating
- CarouselDidEndDecelerating
- ShouldSelectItemAtIndex
- DidSelectItemAtIndex
- CarouselItemWidth
- ItemTransformForOffset
- ValueForOption