{"id":17568721,"url":"https://github.com/globakmaxim/gmsegmentedcontrol","last_synced_at":"2025-04-28T10:21:33.315Z","repository":{"id":56912213,"uuid":"87663260","full_name":"GlobakMaxim/GMSegmentedControl","owner":"GlobakMaxim","description":null,"archived":false,"fork":false,"pushed_at":"2017-09-25T15:43:04.000Z","size":232,"stargazers_count":5,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-28T10:21:31.103Z","etag":null,"topics":["objective-c","uisegmentedcontrol"],"latest_commit_sha":null,"homepage":null,"language":"Objective-C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GlobakMaxim.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-04-08T20:47:25.000Z","updated_at":"2020-11-15T18:34:59.000Z","dependencies_parsed_at":"2022-08-21T03:20:26.434Z","dependency_job_id":null,"html_url":"https://github.com/GlobakMaxim/GMSegmentedControl","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GlobakMaxim%2FGMSegmentedControl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GlobakMaxim%2FGMSegmentedControl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GlobakMaxim%2FGMSegmentedControl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GlobakMaxim%2FGMSegmentedControl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GlobakMaxim","download_url":"https://codeload.github.com/GlobakMaxim/GMSegmentedControl/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251293243,"owners_count":21566070,"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":["objective-c","uisegmentedcontrol"],"created_at":"2024-10-21T17:05:32.976Z","updated_at":"2025-04-28T10:21:33.269Z","avatar_url":"https://github.com/GlobakMaxim.png","language":"Objective-C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GMSegmentedControl\n\n* Customization\n* Swipeable\n* Nullable (Able to deselect segment)\n\n![Sample](./images/sample.gif)\n\n## Installation\n\nCocoapods\n```\npod 'GMSegmentedControl'\n```\n\n## Usage\n\n```objective-c\n  NSArray *segments = @[@\"First\", @\"Second\", @\"Third\"];\n  \n  GMSegmentedControl *segmentedControl = [[GMSegmentedControl alloc] initWithSegments:segments];\n  segmentedControl.frame = CGRectMake(0, 0, 300, 40);\n  segmentedControl.center = self.view.center;\n  segmentedControl.cornerType = GMSegmentedControlCornerTypePill;\n  [segmentedControl addTarget:self action:@selector(segmentedControlValueChanged:) forControlEvents:UIControlEventValueChanged];\n\n  [self.view addSubview:segmentedControl];\n```\n\n## Default settings\n\n```objective-c\nself.clipsToBounds = YES;\nself.selectedSegmentIndex = NSNotFound;\nself.cornerType = GMSegmentedControlCornerTypeDefault;\nself.backgroundColor = [UIColor blueColor];\nself.tintColor = [UIColor whiteColor];\nself.thumbTextColor = [UIColor darkGrayColor];\nself.animationDuration = 0.1;\nself.enableDeselecting = YES;\n```\n\n## Corner radius\n\n```objective-c\ntypedef NS_ENUM(NSInteger, GMSegmentedControlCornerType) {\n  GMSegmentedControlCornerTypeDefault,    // cornerRadius = 0\n  GMSegmentedControlCornerTypeRounded1,   // cornerRadius = 4\n  GMSegmentedControlCornerTypeRounded2,   // cornerRadius = 8\n  GMSegmentedControlCornerTypePill,       // cornerRadius = half height\n};\n```\n\n* GMSegmentedControlCornerTypeDefault\n\n![GMSegmentedControlCornerTypeDefault](./images/GMSegmentedControlCornerTypeDefault.png)\n\n* GMSegmentedControlCornerTypeRounded1\n\n![GMSegmentedControlCornerTypeRounded1](./images/GMSegmentedControlCornerTypeRounded1.png)\n\n* GMSegmentedControlCornerTypeRounded2\n\n![GMSegmentedControlCornerTypeRounded2](./images/GMSegmentedControlCornerTypeRounded2.png)\n\n* GMSegmentedControlCornerTypePill\n\n![GMSegmentedControlCornerTypePill](./images/GMSegmentedControlCornerTypePill.png)\n\n\n## License\n\nGMSegmentedControl is licensed under the terms of the MIT License. Please see the [LICENSE](./LICENSE.md) file for full details.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fglobakmaxim%2Fgmsegmentedcontrol","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fglobakmaxim%2Fgmsegmentedcontrol","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fglobakmaxim%2Fgmsegmentedcontrol/lists"}