Coder Social home page Coder Social logo

krishna03 / complimentarygradientview Goto Github PK

View Code? Open in Web Editor NEW

This project forked from gkye/complimentarygradientview

0.0 2.0 0.0 124 KB

Create complementary gradients generated from dominant and prominent colors in supplied image. Inspired by Grade.js

Swift 97.16% Objective-C 2.84%

complimentarygradientview's Introduction

ComplimentaryGradientView

Create complementary gradients generated from dominant and prominent colors in supplied image. Inspired by Grade.js ❤️

screen shot 2016-08-24 at 8 36 59 pm

Usage

Code

  let gradientView = ComplimentaryGradientView(frame: CGRect(x: 0, y: 0, width: 300, height: 300))
  
   //Colors for gradient are derived from the provided image
    gradientView.image = UIImage(named: "myImg")
  
  //Default = .backgroundPrimary (See GradientType enum for all possible values)
  gradientView.gradientTpye = .backgroundPrimary
  
  //Defaut = Top. Possible values = Top, Left, Right, Bottom
  gradientView.gradientStartPoint = .Left

Storyboard

screen shot 2016-08-24 at 8 38 11 pm

Protocols

  optional func complimentaryGradientView(didSetGradient gradientView: ComplimentaryGradientView, gradientSet: Bool)

Dependencies

UIImageColors

complimentarygradientview's People

Watchers

 avatar  avatar

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.