{"id":19243574,"url":"https://github.com/devdragonli/lflsegmentcontrol","last_synced_at":"2025-04-21T09:33:16.207Z","repository":{"id":62455112,"uuid":"48936997","full_name":"DevDragonLi/LFLSegmentControl","owner":"DevDragonLi","description":"🚥 SegmentSwitchTab ","archived":false,"fork":false,"pushed_at":"2020-07-25T04:11:51.000Z","size":286,"stargazers_count":27,"open_issues_count":0,"forks_count":9,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-01T12:11:11.376Z","etag":null,"topics":["custom-elements","custom-view","helper-tool","segementation","segment"],"latest_commit_sha":null,"homepage":"","language":"Objective-C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DevDragonLi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-01-03T06:48:32.000Z","updated_at":"2024-04-16T10:52:37.000Z","dependencies_parsed_at":"2022-11-02T01:01:38.925Z","dependency_job_id":null,"html_url":"https://github.com/DevDragonLi/LFLSegmentControl","commit_stats":null,"previous_names":["lfl2018/lflsegmentcontrol"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DevDragonLi%2FLFLSegmentControl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DevDragonLi%2FLFLSegmentControl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DevDragonLi%2FLFLSegmentControl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DevDragonLi%2FLFLSegmentControl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DevDragonLi","download_url":"https://codeload.github.com/DevDragonLi/LFLSegmentControl/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250032380,"owners_count":21363828,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["custom-elements","custom-view","helper-tool","segementation","segment"],"created_at":"2024-11-09T17:18:39.543Z","updated_at":"2025-04-21T09:33:11.152Z","avatar_url":"https://github.com/DevDragonLi.png","language":"Objective-C","readme":"\n# LFLSegmentControl: 简单易用分段控件\n\n\u003e 模仿网易新闻和搜狐新闻的首页效果，滑动切换不同栏目视图\n\n## Stargazers over time\n\n[![Stargazers over time](https://starcharts.herokuapp.com/DevDragonLi/iOSDevDemo.svg)](https://starcharts.herokuapp.com/DevDragonLi/iOSDevDemo)\n\n## 效果图\n\n![效果图](./LFLSegmentControl.gif)\n\n## 1.Installation \n\n- With [CocoaPods](http://cocoapods.org), add this line to your Podfile.\n\n```\n   pod 'SegmentControlLFL', '~\u003e 2.0.0' \n   pod install\n\n```\n\n- 也可以下载源码后把LFLUISegmentedControl文件夹直接拖入工程即可,可以clone下拖入工程使用即可.这个是最新版\n\n## 2.代码演示部分\n\n```\n   1.创建控件,建议高度37,其他数值,需要修改源码,适应居中标题view\n   self.LFLuisement=[LFLUISegmentedControl segmentWithFrame:CGRectMake(0, 64,self_Width ,37) titleArray:@[@\"演示标题\",@\"DragonLi\",@\"LFL2018\",@\"Github\"] defaultSelect:0];\n\t\t\t// 非必须设置属性\n    /*\n   2, 自定义各类颜色 和 字体大小\n    [self.LFLuisement titleColor:[UIColor greenColor] selectTitleColor:[UIColor redColor] BackGroundColor:[UIColor grayColor] titleFontSize:13];\n   3. 设置下滑线颜色 .默认为主流的红色\n    [self.LFLuisement lineColor:[UIColor brownColor]];\n   */\n    self.LFLuisement.delegate = self;\n    [self.view addSubview:self.LFLuisement];\n\n#pragma mark ---LFLUISegmentedControlDelegate\n\t/**\n\t*  点击标题按钮\n\t*\n\t*  @param selection 对应下标 begain 0\n\t*/\n\t-(void)uisegumentSelectionChange:(NSInteger)selection{\n\t//    可以根据选中下标执行不同操作,详见demo\n\t}\n\n```\n\nRequirements\n==============\nThis library requires `iOS 6.0+` and `Xcode 6.0+`.\n\n## 有任何问题，请及时 issues me `dragonli_52171@163.com`\n\n## 已知问题,`如果分段数组大于6个,因为没有采取滚动视图承载`,可能会有显示问题,修改下源码即可.但是对于一般简单标题需求可完美使用.\n\n \n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevdragonli%2Flflsegmentcontrol","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevdragonli%2Flflsegmentcontrol","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevdragonli%2Flflsegmentcontrol/lists"}