Latest 0.0.1
Homepage https://github.com/rallets-network/NSGradientView
License MIT
Platforms osx 10.9, requires ARC
Authors

NSView to show gradient color:

NSGradientView

Usage

  1. Add pod 'NSGradientView' in your podfile and run
    pod install
  2. Create one NSView and set its class to NSGradientView
  3. Set Start Color, Start Position, End Color, End Position along with Rotation and done.
    • Default Values:
      Start Color: NSColor(red: 0.86, green: 0.25, blue: 0.59, alpha: 1)
      Start Position (Position to start gradient): 0.0
      End Color: NSColor(red: 0.11, green: 0.14, blue: 0.46, alpha: 0.86)
      End Position (Position where gradient ends): 1.0
      Rotation: 0 (Gradient from left to right)

Examples

  • Settings for outer NSView in the first image:

Settings

  • Settings for the inner NSView in the first image:

Settings

License

The MIT License (MIT)

Copyright (c) 2018 Rallets Network

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Latest podspec

{
    "name": "NSGradientView",
    "version": "0.0.1",
    "summary": "NSView with gradient colors",
    "homepage": "https://github.com/rallets-network/NSGradientView",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Jiawei Li": "[email protected]"
    },
    "source": {
        "git": "https://github.com/rallets-network/NSGradientView.git",
        "tag": "0.0.1"
    },
    "source_files": "NSGradientView/NSGradientView.{swift}",
    "requires_arc": true,
    "platforms": {
        "osx": "10.9"
    },
    "swift_version": "4.2"
}

Pin It on Pinterest

Share This