TestsTested | ✗ |
LangLanguage | Obj-CObjective C |
License | MIT |
ReleasedLast Release | Jun 2016 |
Maintained by dragonLi.
// 1.初次创建:
LFLUISegmentedControl* LFLuisement=[[LFLUISegmentedControl alloc]initWithFrame:CGRectMake(0, 64, CGRectGetWidth([UIScreen mainScreen].bounds), CGRectGetHeight([UIScreen mainScreen].bounds))];
LFLuisement.delegate = self;
// 2.设置显示切换标题数组
NSArray* LFLarray=[NSArray arrayWithObjects:@"演示标题",@"DragonLi",@"LFL2018",@"Github",nil];
[LFLuisement AddSegumentArray:LFLarray];
// default Select the Button
[LFLuisement selectTheSegument:2];
self.LFLuisement = LFLuisement;
[self.view addSubview:LFLuisement];
#pragma mark ---LFLUISegmentedControlDelegate
/**
* 点击标题按钮
*
* @param selection 对应下标 begain 0
*/
-(void)uisegumentSelectionChange:(NSInteger)selection{
// 可以根据选中下标执行不同操作,详见demo
}
This library requires iOS 6.0+
and Xcode 6.0+
.