Drastic.iCarousel 1.0.0

dotnet add package Drastic.iCarousel --version 1.0.0                
NuGet\Install-Package Drastic.iCarousel -Version 1.0.0                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Drastic.iCarousel" Version="1.0.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Drastic.iCarousel --version 1.0.0                
#r "nuget: Drastic.iCarousel, 1.0.0"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Drastic.iCarousel as a Cake Addin
#addin nuget:?package=Drastic.iCarousel&version=1.0.0

// Install Drastic.iCarousel as a Cake Tool
#tool nuget:?package=Drastic.iCarousel&version=1.0.0                

NuGet Version License

Drastic.iCarousel

Drastic.iCarousel is a binding of iCarousel.

iCarousel is a class designed to simplify the implementation of various types of carousel (paged, scrolling views) on iPhone, iPad and Mac OS. iCarousel implements a number of common effects such as cylindrical, flat and "CoverFlow" style carousels, as well as providing hooks to implement your own bespoke effects. Unlike many other "CoverFlow" libraries, iCarousel can work with any kind of view, not just images, so it is ideal for presenting paged data in a fluid and impressive way in your app. It also makes it extremely easy to swap between different carousel effects with minimal code changes.

How To Use

You need to set up at least two items: iCarousel and iCarouselDataSource

public class DrasticCarousel : iCarousel
        {
            public override nint NumberOfItems => 10;

            public DrasticCarousel()
            {
                this.DataSource = new DrasticCarouselDataSource();
            }
        }

        public class DrasticCarouselDataSource : iCarouselDataSource
        {
            private Random random;
            public DrasticCarouselDataSource()
            {
                this.random = new Random();
            }
            [Export("numberOfItemsInCarousel:")]
            public nint NumberOfItemsInCarousel(iCarousel carousel)
            {
                return 10;
            }

            public override UIView CarouselWithView(iCarousel carousel, nint index, UIView? view)
            {
                if (view is null)
                {
                    view = new UIImageView(new CGRect(0, 0, 500, 500));
                }

                if (view is UIImageView imageView)
                {
                    // Load something into image view.
                }

                return view;
            }
        }

The inner carousel items are UI/NSViews and can be anything you like, not just images.

Product Compatible and additional computed target framework versions.
.NET net6.0-ios16.0 is compatible.  net6.0-maccatalyst15.4 is compatible.  net6.0-macos12.3 is compatible.  net6.0-tvos16.0 is compatible.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.0 1,180 1/4/2023