Latest 0.9.6
Homepage https://github.com/yxsufaniOS/SFDualWaySlider
License MIT
Platforms ios 7.0, requires ARC
Dependencies Masonry
Frameworks Foundation, UIKit
Authors

双向滑块

安装

To use SFDualWaySlider add the following to your Podfile

pod ‘SFDualWaySlider’

or

或者直接把“SFDualWaySlider”文件夹拉到项目中.

使用

SFDualWaySlider *slider = [[SFDualWaySlider alloc] initWithFrame:CGRectMake(0, 50, [UIScreen mainScreen].bounds.size.width, 70) minValue:0 maxValue:80 blockSpaceValue:2];
slider.progressRadius = 5;
[slider.minIndicateView setTitle:@"不限"];
[slider.maxIndicateView setTitle:@"不限"];
slider.sliderValueChanged = ^(CGFloat minValue, CGFloat maxValue) {

};

slider.getMinTitle = ^NSString *(CGFloat minValue) {
   if (floor(minValue) == 0.f) {
       return @"不限";
   }else{
       return [NSString stringWithFormat:@"%.fK",floor(minValue)];
   }  

};

slider.getMaxTitle = ^NSString *(CGFloat maxValue) {
   if (floor(maxValue) == 80.f) {
      return @"不限";
   }else{
      return [NSString stringWithFormat:@"%.fK",floor(maxValue)];
   }
};

Latest podspec

{
    "name": "SFDualWaySlider",
    "version": "0.9.6",
    "summary": "SFDualWaySlider",
    "homepage": "https://github.com/yxsufaniOS/SFDualWaySlider",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "sufan": "[email protected]"
    },
    "platforms": {
        "ios": "7.0"
    },
    "source": {
        "git": "https://github.com/yxsufaniOS/SFDualWaySlider.git",
        "tag": "0.9.6"
    },
    "resources": "SFDualWaySlider/*.png",
    "source_files": "SFDualWaySlider/*",
    "requires_arc": true,
    "frameworks": [
        "Foundation",
        "UIKit"
    ],
    "dependencies": {
        "Masonry": []
    }
}

Pin It on Pinterest

Share This