Awesome
Xamarin.iOS.iCarousel
This is a Xamarin iOS Binding for the iCarousel library.
A simple, highly customisable, data-driven 3D carousel for iOS.
Demo
<br/> <br/> <img src="https://github.com/jzeferino/Xamarin.iOS.iCarousel/blob/master/art/icarousel.gif" align="left" width="300"/>Usage
- 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();
<br/>
<br/>
<br/>
<br/>
- Open the sample project for a detailed working example.
IMPORTANT NOTE:
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#.
Carousel Types
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