Drastic.iCarousel
1.0.0
dotnet add package Drastic.iCarousel --version 1.0.0
NuGet\Install-Package Drastic.iCarousel -Version 1.0.0
<PackageReference Include="Drastic.iCarousel" Version="1.0.0" />
paket add Drastic.iCarousel --version 1.0.0
#r "nuget: Drastic.iCarousel, 1.0.0"
// 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
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/NSView
s and can be anything you like, not just images.
Product | Versions 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. |
-
net6.0-ios16.0
-
net6.0-maccatalyst15.4
-
net6.0-macos12.3
-
net6.0-tvos16.0
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 |