JDragonTypeButtonView 0.0.3

JDragonTypeButtonView 0.0.3

TestsTested
LangLanguage Obj-CObjective C
License MIT
ReleasedLast Release Aug 2017

Maintained by JDragon.



  • By
  • JDragon

iOS SliderBtn 封装

使用效果

user pod


pod 'JDragonTypeButtonView','~> 0.0.3'


##基本使用


@interface ViewController ()<JDragonTypeButtonActionDelegate>

@end
@implementation ViewController

- (void)viewDidLoad {
[super viewDidLoad];
self.title = @"首页";
// Do any additional setup after loading the view, typically from a nib.

JDragonTypeButtonView  *typeBtnView = [[JDragonTypeButtonView  alloc]initWithFrame:CGRectMake(0, 64, [UIScreen mainScreen].bounds.size.width, 44)];
[typeBtnView setTypeButtonTitles:@[@"第一个",@"第二个",@"第三个"] withDownLableHeight:2 andDeleagte:self];
[typeBtnView setTypeButtonNormalColor:RGBCOLOR(0x656565) andSelectColor:RGBCOLOR(0xde2418)];
typeBtnView.backgroundColor = [UIColor whiteColor];
[self.view addSubview:typeBtnView];
}
//实现代理
-(void)didClickTypeButtonAction:(UIButton*)button withIndex:(NSInteger)index
{
NSLog(@"现在点击的是%ld个",index);
}



##详细请看demo