Latest 0.0.4
Homepage https://github.com/jojojoe/GDColorSlider
License MIT
Platforms ios 9.0, requires ARC
Dependencies Masonry
Authors
  • GDColorSlider is a Color select bar
  • 这是一个选择颜色的滑动条
  • これは色の選択スライダー

A Quick Peek



Usage

  • 1、通过storyboard 直接拖拽UIView控件,修改类为GDColorSlider即可。可修改属性

  • 2、通过代码添加

导入头文件 #import "GDColorSlider.h"

    GDColorSlider *colorSlider = [[GDColorSlider alloc] initWithFrame:CGRectMake(0, 0, 300, 80)];
    colorSlider.center = CGPointMake(UIScreen.mainScreen.bounds.size.width / 2, UIScreen.mainScreen.bounds.size.height - 80);
    [self.view addSubview:colorSlider];

    colorSlider.isShowContentIndicate = YES;
    colorSlider.isShowBottomIndicate = YES;
    colorSlider.isShowRightIndicate = YES;
    colorSlider.colorImageName = @"colorpan";

    [colorSlider addTarget:self action:@selector(colorValueChange:) forControlEvents:UIControlEventValueChanged];
    - (void)colorValueChange:(GDColorSlider *)sender {
       self.contentPreview.backgroundColor = sender.selectedColor;
    }

只需要传进来颜色图片名即可(默认是一张颜色条图)

isShowContentIndicate 、 isShowBottomIndicate 、 isShowRightIndicate 分别控制颜色区域的指针、底部指针、右侧指针的显示与否

Installation

GDColorSlider is available on CocoaPods. Add the follwing to your Podfile:

pod 'GDColorSlider'

Alternatively, you can manually drag the GDColorSlider folder into your Xcode project

Latest podspec

{
    "name": "GDColorSlider",
    "version": "0.0.4",
    "summary": "ColorSlider ColorSelect ColorBar u989cu8272u9009u53d6u6761 u6ed1u52a8u9009u53d6u989cu8272 u989cu8272u6761",
    "description": "this is a color slider bar, you can select color by touch move the slider bar",
    "homepage": "https://github.com/jojojoe/GDColorSlider",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Joe": "[email protected]"
    },
    "platforms": {
        "ios": "9.0"
    },
    "source": {
        "git": "https://github.com/jojojoe/GDColorSlider.git",
        "tag": "0.0.4"
    },
    "source_files": "GDColorSlider/GDColorSlider/**/*.{h,m}",
    "resources": [
        "GDColorSlider/GDColorSlider/**/*.{png,jpg,jpeg,plist,mp3,html,css,js}",
        "GDColorSlider/GDColorSlider/**/*.{xib, storyBoard}"
    ],
    "resource_bundles": {
        "GDColorSlider": [
            "GDColorSlider/GDColorSlider/*.xcassets"
        ]
    },
    "requires_arc": true,
    "dependencies": {
        "Masonry": []
    }
}

Pin It on Pinterest

Share This