Giter VIP home page Giter VIP logo

colorpickerrow's Introduction

By Mark Alldritt.

NEW

Added a new inline color picker row (InlineColorPickeRow) for version 1.2.

Introduction

ColorPickerRow is a Eureka custom row that allows you to choose colors. ColorRow lets you display a color in a row.

Demo

ColorPickerRow & InlineColorPickerRow Usage

import Eureka

class ViewController: FormViewController {

    override func viewDidLoad() {
        super.viewDidLoad()

        form
            +++ Section("Color Picker Demo")
                <<< ColorPickerRow("colors1") { (row) in
                    row.title = "Color Picker"
                    row.isCircular = false
                    row.showsCurrentSwatch = true
                    row.showsPaletteNames = true
                    row.value = UIColor.green
                }
                .onChange { (picker) in
                    print("color1: \(picker.value!)")
                }
    }
}

ColorRow Usage

import Eureka

class ViewController: FormViewController {

    override func viewDidLoad() {
        super.viewDidLoad()

        form
            +++ Section("Color Swatch Demo")
                <<< ColorRow("swatch1") { (row) in
                    row.title = "Chosen Color"
                    row.value = UIColor.green
                }
    }
}

Requirements

  • iOS 10.0+
  • Xcode 8.3+
  • Eureka 2.0.*

Getting involved

  • If you want to contribute please feel free to submit pull requests.
  • If you have a feature request please open an issue.
  • If you found a bug or need help please check older issues, FAQ before submitting an issue..

Before contribute check the CONTRIBUTING file for more info.

If you use ColorPickerRow in your app I would love to hear about it! Drop me a line on twitter.

Installation

  1. Add the following to your Podfile:
    pod 'ColorPickerRow'  
  1. Run $ pod install

ColorPickerRow Customization

  • isCircular allows you to choose between circular and rounded square color swatches.

  • showsCurrentSwatch determines if the row displays a swatch to the right of the row title showing the currently selected color.

  • showsPaletteNames determines if color palette names are displayed in the color row.

  • cell.palettes you can also customize the color palette(s) displayed by configuring the cell's palettes property. Here's a brief example (note that a more complete example of how to do this is included in the Example application).'

                <<< ColorPickerRow("colors") { (row) in
                    row.title = "Color Picker"
                    row.isCircular = true
                    row.showsCurrentSwatch = false
                    row.showsPaletteNames = false
                    row.value = UIColor.white
                }
                .cellSetup { (cell, row) in
                    let palette = ColorPalette(name: "All",
                                               palette: [ColorSpec(hex: "#ffffff", name: "White"),
                                                         ColorSpec(hex: "#000000", name: "Black")])
                    cell.palettes = [palette]
                }

InlineColorPickerRow Customization

  • isCircular allows you to choose between circular and rounded square color swatches.

  • showsCurrentSwatch determines if the row displays a swatch to the right of the row title showing the currently selected color.

  • showsPaletteNames determines if color palette names are displayed in the color row.

ColorRow Customization

  • isCircular allows you to choose between circular and rounded square color swatches.

Author

FAQ

nothing yet

Applications using ColorPickerRow

Other Rows

See my other contributions to the Eureka Community:

colorpickerrow's People

Contributors

alldritt avatar cwebbs avatar chuckboris avatar plbeaudoin avatar

Watchers

James Cloos 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.