{"id":2791,"url":"https://github.com/Ramotion/paper-switch","last_synced_at":"2025-08-06T16:31:34.521Z","repository":{"id":23793494,"uuid":"27169238","full_name":"Ramotion/paper-switch","owner":"Ramotion","description":":octocat: 🎚 RAMPaperSwitch is a Swift material design UI module which paints over the parent view when the switch is turned on. iOS library by @Ramotion","archived":false,"fork":false,"pushed_at":"2022-01-25T19:02:51.000Z","size":3691,"stargazers_count":2931,"open_issues_count":6,"forks_count":230,"subscribers_count":81,"default_branch":"master","last_synced_at":"2024-10-29T15:34:08.313Z","etag":null,"topics":["component","ios","library","swift"],"latest_commit_sha":null,"homepage":"https://www.ramotion.com/paper-switch/","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/Ramotion.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-11-26T09:26:50.000Z","updated_at":"2024-10-29T07:13:04.000Z","dependencies_parsed_at":"2022-08-07T11:00:46.838Z","dependency_job_id":null,"html_url":"https://github.com/Ramotion/paper-switch","commit_stats":null,"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ramotion%2Fpaper-switch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ramotion%2Fpaper-switch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ramotion%2Fpaper-switch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ramotion%2Fpaper-switch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Ramotion","download_url":"https://codeload.github.com/Ramotion/paper-switch/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228923700,"owners_count":17992567,"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":["component","ios","library","swift"],"created_at":"2024-01-05T20:16:22.946Z","updated_at":"2024-12-09T16:31:05.617Z","avatar_url":"https://github.com/Ramotion.png","language":"Swift","readme":"\u003ca href=\"https://www.ramotion.com/agency/app-development/?utm_source=gthb\u0026utm_medium=repo\u0026utm_campaign=folding-cell\"\u003e\u003cimg src=\"https://github.com/Ramotion/folding-cell/blob/master/header.png\"\u003e\u003c/a\u003e\n\n\u003ca href=\"https://github.com/Ramotion/folding-cell\"\u003e\n\u003cimg align=\"left\" src=\"https://github.com/Ramotion/paper-switch/blob/master/paper-switch.gif\" width=\"480\" height=\"360\" /\u003e\u003c/a\u003e\n\n\u003cp\u003e\u003ch1 align=\"left\"\u003ePAPER SWITCH\u003c/h1\u003e\u003c/p\u003e\n\n\u003ch4\u003eA Swift material design UI module which paints over the parent view when the switch is on.\u003c/h4\u003e\n\n\n___\n\n\n\n\u003cp\u003e\u003ch6\u003eWe specialize in the designing and coding of custom UI for Mobile Apps and Websites.\u003c/h6\u003e\n\u003ca href=\"https://www.ramotion.com/agency/app-development/?utm_source=gthb\u0026utm_medium=repo\u0026utm_campaign=paper-switch\"\u003e\n\u003cimg src=\"https://github.com/ramotion/gliding-collection/raw/master/contact_our_team@2x.png\" width=\"187\" height=\"34\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\u003cp\u003e\u003ch6\u003eStay tuned for the latest updates:\u003c/h6\u003e\n\u003ca href=\"https://goo.gl/rPFpid\" \u003e\n\u003cimg src=\"https://i.imgur.com/ziSqeSo.png/\" width=\"156\" height=\"28\"\u003e\u003c/a\u003e\u003c/p\u003e\n\n\u003c/br\u003e\n\n[![CocoaPods](https://img.shields.io/cocoapods/p/RAMPaperSwitch.svg)](https://cocoapods.org/pods/RAMPaperSwitch)\n[![CocoaPods](https://img.shields.io/cocoapods/v/RAMPaperSwitch.svg)](http://cocoapods.org/pods/RAMPaperSwitch)\n[![CocoaPods](https://img.shields.io/cocoapods/metrics/doc-percent/RAMPaperSwitch.svg)](https://cdn.rawgit.com/Ramotion/paper-switch/master/docs/index.html)\n[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Ramotion/paper-switch)\n[![Twitter](https://img.shields.io/badge/Twitter-@Ramotion-blue.svg?style=flat)](http://twitter.com/Ramotion)\n[![Travis](https://img.shields.io/travis/Ramotion/paper-switch.svg)](https://travis-ci.org/Ramotion/paper-switch)\n[![Donate](https://img.shields.io/badge/Donate-PayPal-blue.svg)](https://paypal.me/Ramotion)\n\n## Requirements\n\n- iOS 8.0+\n- Xcode 9.0+\n\n# Installation\n\nJust add the `RAMPaperSwitch` folder to your project.\n\nor use [CocoaPods](https://cocoapods.org) with Podfile:\n``` ruby\npod 'RAMPaperSwitch' \n```\nor [Carthage](https://github.com/Carthage/Carthage) users can simply add to their `Cartfile`:\n```\ngithub \"Ramotion/paper-switch\"\n```\n\n\n# Usage\nRAMPaperSwitch is a drop-in replacement of UISwitch. You just need to set the `onTintColor` property of the switch, and it will automatically _paint over_ its superview with the selected color.\nYou have ability to set duration of animation instead of default value.\n\n1. Create a new UISwitch in your storyboard or nib.\n\n2. Set the class of the UISwitch to RAMPaperSwitch in your Storyboard or nib.\n\n3. Set `onTintColor` for the switch\n\n4. Set `duration` property programmatically if You want to change animation duration.\n\n5. Add animation for other views near the switch if need.\n\n\n# Animate views\nYou can animate other views near the switch. For example, you can change color to views or labels that are inside the same superview. Duration of animation can be gotten from the RAMPaperSwitch's property `duration`. You can animate CoreAnimation properties like this:\n\n``` swift\nself.paperSwitch.animationDidStartClosure = {(onAnimation: Bool) in\n    UIView.transitionWithView(self.label, duration: self.paperSwitch.duration, options: UIViewAnimationOptions.TransitionCrossDissolve, animations: {\n        self.label.textColor = onAnimation ? UIColor.whiteColor() : UIColor.blueColor()\n    }, completion:nil)\n}\n```\n\n\u003cbr\u003e\n\n## 📄 License\n\nPaper Switch is released under the MIT license.\nSee [LICENSE](./LICENSE) for details.\n\nThis library is a part of a \u003ca href=\"https://github.com/Ramotion/swift-ui-animation-components-and-libraries\"\u003e\u003cb\u003eselection of our best UI open-source projects.\u003c/b\u003e\u003c/a\u003e\n\nIf you use the open-source library in your project, please make sure to credit and backlink to www.ramotion.com\n\n## 📱 Get the Showroom App for iOS to give it a try\nTry this UI component and more like this in our iOS app. Contact us if interested.\n\n\u003ca href=\"https://itunes.apple.com/app/apple-store/id1182360240?pt=550053\u0026ct=folding-cell\u0026mt=8\" \u003e\n\u003cimg src=\"https://github.com/ramotion/gliding-collection/raw/master/app_store@2x.png\" width=\"117\" height=\"34\"\u003e\u003c/a\u003e\n\n\u003ca href=\"https://www.ramotion.com/agency/app-development/?utm_source=gthb\u0026utm_medium=repo\u0026utm_campaign=folding-cell\"\u003e\n\u003cimg src=\"https://github.com/ramotion/gliding-collection/raw/master/contact_our_team@2x.png\" width=\"187\" height=\"34\"\u003e\u003c/a\u003e\n\u003cbr\u003e\n\u003cbr\u003e\n","funding_links":["https://paypal.me/Ramotion"],"categories":["UI","Libs","iOS","Content","UI [🔝](#readme)"],"sub_categories":["Switch","UI","Components","Layout","Other free courses"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FRamotion%2Fpaper-switch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FRamotion%2Fpaper-switch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FRamotion%2Fpaper-switch/lists"}