Skip to content
This repository has been archived by the owner on Jun 17, 2022. It is now read-only.

VeinGuo/VGGradientSwitch

Repository files navigation

VGGradientSwitch

一个渐变效果的switch

设计图

效果图

  • gif效果图有点卡,可以下载demo后查看效果。
  • 动画可能有些偏差,有任何问题可以issues给我。

image

使用

	VGGradientSwitch *switchButton = [[VGGradientSwitch alloc] init];
    [switchButton setOn:NO animated:YES];
    switchButton.action = ^(BOOL isOn){
        NSLog(@"%@",isOn?@"打开":@"关闭");
    };
  • 也可以直接设置storyboard
  • 支持设置border颜色、knob上颜色、knob线条width

image

Releases

No releases published

Packages

No packages published