{"id":19805620,"url":"https://github.com/remirobert/suitchi","last_synced_at":"2026-02-17T04:32:33.745Z","repository":{"id":29441331,"uuid":"32977423","full_name":"remirobert/Suitchi","owner":"remirobert","description":"Custom Switch for iOS.","archived":false,"fork":false,"pushed_at":"2016-02-13T02:53:59.000Z","size":78,"stargazers_count":32,"open_issues_count":2,"forks_count":5,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-15T10:24:53.634Z","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/remirobert.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":"2015-03-27T09:18:55.000Z","updated_at":"2024-11-07T05:28:53.000Z","dependencies_parsed_at":"2022-09-06T18:12:03.331Z","dependency_job_id":null,"html_url":"https://github.com/remirobert/Suitchi","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/remirobert%2FSuitchi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/remirobert%2FSuitchi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/remirobert%2FSuitchi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/remirobert%2FSuitchi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/remirobert","download_url":"https://codeload.github.com/remirobert/Suitchi/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251835597,"owners_count":21651678,"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":[],"created_at":"2024-11-12T09:04:41.254Z","updated_at":"2026-02-17T04:32:33.706Z","avatar_url":"https://github.com/remirobert.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src =\"https://raw.githubusercontent.com/remirobert/Suitchi/master/README/Suitchi.png\"/\u003e\n\u003c/p\u003e\n\n[![Platform](http://img.shields.io/badge/platform-ios-blue.svg?style=flat\n)](https://developer.apple.com/iphone/index.action)\n[![Language](http://img.shields.io/badge/language-swift-brightgreen.svg?style=flat\n)](https://developer.apple.com/swift)\n[![License](http://img.shields.io/badge/license-MIT-lightgrey.svg?style=flat\n)](http://mit-license.org)\n[![Issues](https://img.shields.io/github/issues/nghialv/Transporter.svg?style=flat\n)](https://github.com/remirobert/Suitchi/issues?state=open)\n\n**Suitchi** is a custom switch for iOS written in swift. **Suitchi** is highly customizable, you can change almost all parts of this composant. It can display a label in the center of the switch to display some additional information. **Suitchi** handles gesture and simple click.\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src =\"https://raw.githubusercontent.com/remirobert/Suitchi/master/README/simple.gif\"/\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n  Customize as you wish.\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n  \u003cimg src =\"https://raw.githubusercontent.com/remirobert/Suitchi/master/README/simple2.gif\"/\u003e\n\u003c/p\u003e\n\nInstallation\n============\nCocoaPods\n```\npod 'Suitchi'\n```\n\nOr just copy the **Sources/Suitchi.swift** file in your project.\n\nHow it works ?\n==============\nTo make your life easier and make your most beautiful and maintainable code, **Suitchi** uses blocks to retrieve the events.\n```Swift\nlet genderSwitch = Suitchi(frame: CGRectMake(0, 0, 300, 100),\n  onSwitchedBlock: { () -\u003e () in\n    println(\"On !\")\n  }) { () -\u003e () in\n    println(\"Off !\")\n}\n```\n\nGet the current state, or change it:\n```Swift\nif genderSwitch.on {\n}\n\ngenderSwitch.switchOn()\ngenderSwitch.switchOff()\n```\n\nSome customisation:\n```Swift\ngenderSwitch.offLabel = \"Man\"\ngenderSwitch.onLabel = \"Woman\"\n\ngenderSwitch.onColor = UIColor(red:1, green:0.15, blue:0.29, alpha:1)\ngenderSwitch.offColor =  UIColor(red:0.3, green:0.3, blue:0.82, alpha:1)\n\ngenderSwitch.centerText = \"gender\"\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fremirobert%2Fsuitchi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fremirobert%2Fsuitchi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fremirobert%2Fsuitchi/lists"}