Xamarin iOS Expanding Splash View NuGet Announcement!

Here’s another fun NuGet package I’ve put up for everyone: The ExpandingSplashView is a Xamarin.iOS Binding implementation of the CBZSplashView from CallumBoddy on GitHub: https://github.com/callumboddy/CBZSplashView

It allows you to create a quick expanding view and add it to any ViewController very easily. It also allows for you to create the expanding view from either a rasterized image such as a png icon, or from a vector icon using a UIBezierPath.

Here’s the NuGet Package: https://www.nuget.org/packages/ExpandingSplashView

And the GitHub project for the binding and NuGet: https://github.com/SuavePirate/ExpandingSplashView
twitter-gif
Be sure to read the documentation either below here or on the GitHub project!

Documentation


CBZSplashView

A Xamarin.iOS implementation of the popular iOS control CBZSplashView from @callumboddy

Credit where credit is due (I just spent a couple hours fighting with the binding libraries, but @callumboddy did the real work): https://github.com/callumboddy/CBZSplashView

Installation

You can either clone the repository and reference the CBZSplashView project, or you can now use NuGet!

Install-Package ExpandingSplashView

https://www.nuget.org/packages/ExpandingSplashView

Usage

This can be used on any view, but is best suited for covering an entire UIViewController. Simply create either a CBZSplashViewCBZRasterSplashView, or CBZVectorSplashView via their constructors or the static initializer within the CBZSplashView:

var splashView = new CBZRasterSplashView(someUIImage, someUIColor);

Then add the splashview to your View:

View.Add(splashView);

Then start your animation whenever you want:

splashView.StartAnimation();

Here’s an entire ViewController class example:

using System;

using UIKit;
using CBZSplashView;

namespace Example
{
    public partial class ViewController : UIViewController
    {
        private CBZSplashView.CBZSplashView _splashView;
        protected ViewController(IntPtr handle) : base(handle)
        {
        }

        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            var icon = UIImage.FromFile("snapchatIcon.png");

            _splashView = new CBZSplashView.CBZRasterSplashView(icon, UIColor.Yellow);

            View.Add(_splashView);

        }

        public override void ViewDidAppear(bool animated)
        {
            base.ViewDidAppear(animated);

            if (_splashView != null)
                _splashView.StartAnimation();
        }
    }
}

If you like what you see, don’t forget to follow me on twitter @Suave_Pirate, check out my GitHub, and subscribe to my blog to learn more mobile developer tips and tricks!

Interested in sponsoring developer content? Message @Suave_Pirate on twitter for details.

Advertisement

One thought on “Xamarin iOS Expanding Splash View NuGet Announcement!”

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s