Giter Site home page Giter Site logo

gradientcolorsignal's Introduction

GradientColorSignal

CocoaPods Compatible Platform Twitter License

Animated Gradient Color Signal.

Podfile

To integrate GradientColorSignal into your Xcode project using CocoaPods, specify it in your Podfile:

pod 'GradientColorSignal'

Preview

full

Demo Gif

hollow

Demo Gif

How to use

Signal Type Default:

#import "GradientColorSignal.h"

#pragma mark - init and setup GradientColorSignal

_signal = [[GradientColorSignal alloc] init];
[_signal setType: SignalTypeDefault];
[_signal setStartAngle: @(-M_PI/2)];
//[_signal setEndAngle: @(M_PI/2)];
[_signal setStartPoint: CGPointMake(0, 0.5)];
[_signal setEndPoint: CGPointMake(1, 0.5)];
[_signal setLineWidth: @10];
[_signal setClockwise: NO];
[_signal setLineCap: kCALineCapRound];
        
[_signal reload];

#pragma mark - animations
//type 1:
[_signal animateToScale: 0.33 duration: 0.3];
//type 2:
[_signal animateToScale: 0.33 duration: 0.3 function:[CAMediaTimingFunction functionWithName: kCAMediaTimingFunctionEaseIn]];

Signal Type Searching:

#import "GradientColorSignal.h"

_signal = [[GradientColorSignal alloc] init];
[_signal setType: SignalTypeSearching];
[_signal setSearchingColor: [UIColor grayColor]];
[_signal setStartAlpha: 1.0];
[_signal setEndAlpha: 0.1];
[_signal setClockwise: YES];
[_signal setSearchingLineWidth: @10];
[_signal setDuration: 1.0];

[_signal reload]; //Auto-rotate when loaded

Stop Animation:

[_signal stop];

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.