[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-7053":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":16,"stars7d":16,"stars30d":16,"stars90d":16,"forks30d":16,"starsTrendScore":16,"compositeScore":17,"rankGlobal":10,"rankLanguage":10,"license":18,"archived":19,"fork":19,"defaultBranch":20,"hasWiki":21,"hasPages":19,"topics":22,"createdAt":10,"pushedAt":10,"updatedAt":27,"readmeContent":28,"aiSummary":29,"trendingCount":16,"starSnapshotCount":16,"syncStatus":15,"lastSyncTime":30,"discoverSource":31},7053,"paper-switch","Ramotion\u002Fpaper-switch","Ramotion",":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","https:\u002F\u002Fwww.ramotion.com\u002Fpaper-switch\u002F",null,"Swift",2909,223,75,2,0,59.05,"MIT License",false,"master",true,[23,24,25,26],"component","ios","library","swift","2026-06-12 04:00:32","\u003Ca href=\"https:\u002F\u002Fwww.ramotion.com\u002Fagency\u002Fapp-development\u002F?utm_source=gthb&utm_medium=repo&utm_campaign=folding-cell\">\u003Cimg src=\"https:\u002F\u002Fgithub.com\u002FRamotion\u002Ffolding-cell\u002Fblob\u002Fmaster\u002Fheader.png\">\u003C\u002Fa>\n\n\u003Ca href=\"https:\u002F\u002Fgithub.com\u002FRamotion\u002Ffolding-cell\">\n\u003Cimg align=\"left\" src=\"https:\u002F\u002Fgithub.com\u002FRamotion\u002Fpaper-switch\u002Fblob\u002Fmaster\u002Fpaper-switch.gif\" width=\"480\" height=\"360\" \u002F>\u003C\u002Fa>\n\n\u003Cp>\u003Ch1 align=\"left\">PAPER SWITCH\u003C\u002Fh1>\u003C\u002Fp>\n\n\u003Ch4>A Swift material design UI module which paints over the parent view when the switch is on.\u003C\u002Fh4>\n\n\n___\n\n\n\n\u003Cp>\u003Ch6>We specialize in the designing and coding of custom UI for Mobile Apps and Websites.\u003C\u002Fh6>\n\u003Ca href=\"https:\u002F\u002Fwww.ramotion.com\u002Fagency\u002Fapp-development\u002F?utm_source=gthb&utm_medium=repo&utm_campaign=paper-switch\">\n\u003Cimg src=\"https:\u002F\u002Fgithub.com\u002Framotion\u002Fgliding-collection\u002Fraw\u002Fmaster\u002Fcontact_our_team@2x.png\" width=\"187\" height=\"34\">\u003C\u002Fa>\n\u003C\u002Fp>\n\u003Cp>\u003Ch6>Stay tuned for the latest updates:\u003C\u002Fh6>\n\u003Ca href=\"https:\u002F\u002Fgoo.gl\u002FrPFpid\" >\n\u003Cimg src=\"https:\u002F\u002Fi.imgur.com\u002FziSqeSo.png\u002F\" width=\"156\" height=\"28\">\u003C\u002Fa>\u003C\u002Fp>\n\n\u003C\u002Fbr>\n\n[![CocoaPods](https:\u002F\u002Fimg.shields.io\u002Fcocoapods\u002Fp\u002FRAMPaperSwitch.svg)](https:\u002F\u002Fcocoapods.org\u002Fpods\u002FRAMPaperSwitch)\n[![CocoaPods](https:\u002F\u002Fimg.shields.io\u002Fcocoapods\u002Fv\u002FRAMPaperSwitch.svg)](http:\u002F\u002Fcocoapods.org\u002Fpods\u002FRAMPaperSwitch)\n[![CocoaPods](https:\u002F\u002Fimg.shields.io\u002Fcocoapods\u002Fmetrics\u002Fdoc-percent\u002FRAMPaperSwitch.svg)](https:\u002F\u002Fcdn.rawgit.com\u002FRamotion\u002Fpaper-switch\u002Fmaster\u002Fdocs\u002Findex.html)\n[![Carthage compatible](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FCarthage-compatible-4BC51D.svg?style=flat)](https:\u002F\u002Fgithub.com\u002FRamotion\u002Fpaper-switch)\n[![Twitter](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FTwitter-@Ramotion-blue.svg?style=flat)](http:\u002F\u002Ftwitter.com\u002FRamotion)\n[![Travis](https:\u002F\u002Fimg.shields.io\u002Ftravis\u002FRamotion\u002Fpaper-switch.svg)](https:\u002F\u002Ftravis-ci.org\u002FRamotion\u002Fpaper-switch)\n[![Donate](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FDonate-PayPal-blue.svg)](https:\u002F\u002Fpaypal.me\u002FRamotion)\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:\u002F\u002Fcocoapods.org) with Podfile:\n``` ruby\npod 'RAMPaperSwitch' \n```\nor [Carthage](https:\u002F\u002Fgithub.com\u002FCarthage\u002FCarthage) users can simply add to their `Cartfile`:\n```\ngithub \"Ramotion\u002Fpaper-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>\n\n## 📄 License\n\nPaper Switch is released under the MIT license.\nSee [LICENSE](.\u002FLICENSE) for details.\n\nThis library is a part of a \u003Ca href=\"https:\u002F\u002Fgithub.com\u002FRamotion\u002Fswift-ui-animation-components-and-libraries\">\u003Cb>selection of our best UI open-source projects.\u003C\u002Fb>\u003C\u002Fa>\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:\u002F\u002Fitunes.apple.com\u002Fapp\u002Fapple-store\u002Fid1182360240?pt=550053&ct=folding-cell&mt=8\" >\n\u003Cimg src=\"https:\u002F\u002Fgithub.com\u002Framotion\u002Fgliding-collection\u002Fraw\u002Fmaster\u002Fapp_store@2x.png\" width=\"117\" height=\"34\">\u003C\u002Fa>\n\n\u003Ca href=\"https:\u002F\u002Fwww.ramotion.com\u002Fagency\u002Fapp-development\u002F?utm_source=gthb&utm_medium=repo&utm_campaign=folding-cell\">\n\u003Cimg src=\"https:\u002F\u002Fgithub.com\u002Framotion\u002Fgliding-collection\u002Fraw\u002Fmaster\u002Fcontact_our_team@2x.png\" width=\"187\" height=\"34\">\u003C\u002Fa>\n\u003Cbr>\n\u003Cbr>\n","RAMPaperSwitch 是一个基于 Swift 的 Material Design UI 组件，当开关打开时会在父视图上绘制颜色。其核心功能是通过设置 `onTintColor` 属性来自动覆盖父视图的颜色，并且支持自定义动画时长。该组件作为 UISwitch 的替代品，适用于需要增强用户体验和视觉效果的 iOS 应用场景中，如个性化设置界面或控制面板等。此外，它还允许开发者为开关附近的其他视图添加动画效果，进一步提升界面的交互性和美观度。","2026-06-11 03:10:18","top_language"]