Skip to content

A simple, highly customisable, data-driven 3D carousel for iOS Binding for Xamarin.iOS.

License

Notifications You must be signed in to change notification settings

jzeferino/Xamarin.iOS.iCarousel

Repository files navigation

Build Status NuGet

Xamarin.iOS.iCarousel

This is a Xamarin iOS Binding for the iCarousel library.

A simple, highly customisable, data-driven 3D carousel for iOS.

Demo



Usage

  1. Install NuGet package.
  2. 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.

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

Please check the original README for more information.

License

MIT Licence

About

A simple, highly customisable, data-driven 3D carousel for iOS Binding for Xamarin.iOS.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published