{"id":22205032,"url":"https://github.com/mor4eza/badgesegments","last_synced_at":"2025-10-28T13:07:08.828Z","repository":{"id":56903419,"uuid":"210130466","full_name":"Mor4eza/BadgeSegments","owner":"Mor4eza","description":"A customizable Segment View with Badges","archived":false,"fork":false,"pushed_at":"2019-09-22T13:43:31.000Z","size":97,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-14T17:48:09.384Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Swift","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/Mor4eza.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":"2019-09-22T10:42:43.000Z","updated_at":"2025-02-21T19:08:20.000Z","dependencies_parsed_at":"2022-08-21T02:50:12.009Z","dependency_job_id":null,"html_url":"https://github.com/Mor4eza/BadgeSegments","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/Mor4eza/BadgeSegments","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mor4eza%2FBadgeSegments","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mor4eza%2FBadgeSegments/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mor4eza%2FBadgeSegments/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mor4eza%2FBadgeSegments/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Mor4eza","download_url":"https://codeload.github.com/Mor4eza/BadgeSegments/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mor4eza%2FBadgeSegments/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278804671,"owners_count":26048959,"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","status":"online","status_checked_at":"2025-10-07T02:00:06.786Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-12-02T17:25:46.561Z","updated_at":"2025-10-07T16:14:14.588Z","avatar_url":"https://github.com/Mor4eza.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# BadgeSegments\n\n[![CI Status](https://img.shields.io/travis/mor4eza/BadgeSegments.svg?style=flat)](https://travis-ci.org/mor4eza/BadgeSegments)\n[![Version](https://img.shields.io/cocoapods/v/BadgeSegments.svg?style=flat)](https://cocoapods.org/pods/BadgeSegments)\n[![License](https://img.shields.io/cocoapods/l/BadgeSegments.svg?style=flat)](https://cocoapods.org/pods/BadgeSegments)\n[![Platform](https://img.shields.io/cocoapods/p/BadgeSegments.svg?style=flat)](https://cocoapods.org/pods/BadgeSegments)\n\n## ScreenShots\n\n**standard**\n\n![alt text](https://raw.githubusercontent.com/Mor4eza/BadgeSegments/master/screenshot1.png)\n\n\n\n**Underlined**\n\n![alt text](https://raw.githubusercontent.com/Mor4eza/BadgeSegments/master/screenshot2.png)\n\n\n## Example\n\nTo run the example project, clone the repo, and run `pod install` from the Example directory first.\n\n## Requirements\n- Swift =\u003e 5\n- iOS =\u003e 10\n\n## Installation\n**Cocoapods**\n\nBadgeSegments is available through [CocoaPods](https://cocoapods.org). To install\nit, simply add the following line to your Podfile:\n\n```ruby\npod 'BadgeSegments'\n```\n**Manual**\n\nsimply copy classes folder to your project directory\n\n# How to Use\n\n  add a UIView to your view Controller and sub class it from BadgeSegments class\n  ```swift\n  @IBOutlet weak var badgeSegment: BadgeSegments!\n    override func viewDidLoad() {\n        super.viewDidLoad()\n\n\n          let items = [SegmentItem(title: \"first\",isSelected: false,badgeNumber: 20),\n                     SegmentItem(title: \"second\",isSelected: true),\n                     SegmentItem(title: \"third\",isSelected: false,badgeNumber: 12)]\n        badgeSegment.appearence = .standard\n        badgeSegment.delegate = self\n        badgeSegment.setUpSegments(with: items)\n    }\n  ```\n  **Delegate**\n  ```swift\n  class ViewController: UIViewController, BadgeSegmentDelegate {\n  \n     func didSelectSegment(with index: Int) {\n        print(index)\n     }\n    \n  \n  }\n  ```\n  **Change Values**\n  ```swift\n   badgeSegment.setTitle(inIndex: 0, title: \"changed\")\n        badgeSegment.setSelected(inIndex: 2)\n        badgeSegment.setBadgeNumber(inIndex: 1, badgeNum: 12)\n  \n  ```\n\n# TO Do\n- [ ] add animation\n- [ ] more default appearences\n- [ ] support images\n- [ ] customize badge view\n- [ ] add UITest and UnitTest\n\n\n# Made with Love in 🇮🇷\nMorteza Gharedaghi: Morteza.ghrdi@gmail.com\n\nfeel free to create issue or open a pull request ☺️\n\n\n# Used in\nsend your application name to me,if you used this library \n\n- Wink App\n\n## License\n\nBadgeSegments is available under the MIT license. See the LICENSE file for more info.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmor4eza%2Fbadgesegments","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmor4eza%2Fbadgesegments","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmor4eza%2Fbadgesegments/lists"}