{"id":20248710,"url":"https://github.com/gokulgovind/glscratchcard","last_synced_at":"2025-04-10T22:24:16.801Z","repository":{"id":56912188,"uuid":"202458029","full_name":"gokulgovind/GLScratchCard","owner":"gokulgovind","description":"I loved the way payments app's like Google pay and PhonePe used scratch card option to reward it's user. Hence with 💛 cloned the same scratch card effect for you guys out there","archived":false,"fork":false,"pushed_at":"2019-10-22T16:23:54.000Z","size":7140,"stargazers_count":85,"open_issues_count":5,"forks_count":19,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-09-15T11:47:14.361Z","etag":null,"topics":["googlepaytez","phonepe","scratch","scratchcard","swift","swiftlibrary"],"latest_commit_sha":null,"homepage":"","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/gokulgovind.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-08-15T02:16:20.000Z","updated_at":"2024-06-25T10:04:05.000Z","dependencies_parsed_at":"2022-08-20T20:20:48.157Z","dependency_job_id":null,"html_url":"https://github.com/gokulgovind/GLScratchCard","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/gokulgovind%2FGLScratchCard","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gokulgovind%2FGLScratchCard/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gokulgovind%2FGLScratchCard/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gokulgovind%2FGLScratchCard/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gokulgovind","download_url":"https://codeload.github.com/gokulgovind/GLScratchCard/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248307289,"owners_count":21081818,"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":["googlepaytez","phonepe","scratch","scratchcard","swift","swiftlibrary"],"created_at":"2024-11-14T09:49:12.026Z","updated_at":"2025-04-10T22:24:16.781Z","avatar_url":"https://github.com/gokulgovind.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# GLScratchCard\n\n\n\n[![CI Status](https://img.shields.io/travis/gokulece26@gmail.com/GLScratchCard.svg?style=flat)](https://travis-ci.org/gokulece26@gmail.com/GLScratchCard)\n\n[![Version](https://img.shields.io/cocoapods/v/GLScratchCard.svg?style=flat)](https://cocoapods.org/pods/GLScratchCard)\n\n[![License](https://img.shields.io/cocoapods/l/GLScratchCard.svg?style=flat)](https://cocoapods.org/pods/GLScratchCard)\n\n[![Platform](https://img.shields.io/cocoapods/p/GLScratchCard.svg?style=flat)](https://cocoapods.org/pods/GLScratchCard)\n\n\n\n![overView](ScreenShots/Demo1.png)\n\n\n\n## Example\n\n\n\nTo run the example project, clone the repo, and run `pod install` from the Example directory first.\n\n\n\n## Requirements\n\n\n\n`GLScratchCard` XCode 10 and Swift 4.2. With deployment target `11.0`.\n\n\n\n## Installation\n\n\n\n## Cocoapods\n\n\n\n`GLScratchCard` is available through [CocoaPods](https://cocoapods.org). To install\n\nit, simply add the following line to your Podfile:\n\n\n\n```ruby\n\npod 'GLScratchCard'\n\n```\n\n## Manual\n\nCopy the files from ~/Pods/DevelopmentPods/GLScratchCard/ to your project.\n\n\n\n## User Guide\n\n### Basic Usage\n\n```swift\nlet controller = GLScratchCardController()\ncontroller.scratchCardView.addDelegate(delegate: self)\ncontroller.scratchCardView.bottomLayerView = UIImageView(image: UIImage(named: \"cash_back\"))\ncontroller.scratchCardView.topLayerImage = UIImage(named:\"scratch_image\")!\ncontroller.presentScratchController()\n```\n\n![sampleGifDPay](ScreenShots/screen_record1.gif)\n\n### Break Down\n```swift\nlet controller = GLScratchCardController() \n```\n\n### Setting up Components\n\nTitles to be shown initilly, before scratch starts\n\n```swift\ncontroller.scratchCardView.doneButtonTitle = \"Gift to a friend\"\ncontroller.scratchCardView.scratchCardTitle = \"Earn up to ₹1,0000\"\ncontroller.scratchCardView.scratchCardSubTitle = \"From Google Pay \\nEarned for paying \\nGokul\"\n```\n\nTitle to be show after scratch ends,\n\n```swift\ncontroller.scratchCardView.afterScratchDoneButtonTitle = \"Done\"\ncontroller.scratchCardView.afterScratchTitle = \"Woohoo!\"\ncontroller.scratchCardView.afterScratchSubTitle = \"Expect payment within a weak.\"\n```\n\nTop layer image view,\n\n```swift\ncontroller.scratchCardView.topLayerImage = UIImage(named:\"scratch_image\")!\n\nBottom layer image view (one that will be reviled after scratching ends),\n\ncontroller.scratchCardView.bottomLayerView = UIImageView(image: UIImage(named: \"cash_back\"))\n\nCan customise scratch size and shape (.round, .square, .butt),\n\ncontroller.scratchCardView.scratchCardImageView.lineWidth = 50\ncontroller.scratchCardView.scratchCardImageView.lineType = .round\n```\n\n### Delegates\n\n1. `GLScratchCardDelegate`\n2. `GLScratchCarImageViewDelegate`\n\nAdd delegates,\n\n```swift\ncontroller.scratchCardView.addDelegate(delegate: self)\ncontroller.scratchCardView.scratchCardImageView.addDelegate(delegate:self)\n```\n\n#### GLScratchCardDelegate\n\n```swift\nfunc didCloseButtonPressed(sender: UIButton)\nfunc didDoneButtonPressed(sender: UIButton)\n```\n\n#### GLScratchCarImageViewDelegate\n\n```swift\nfunc scratchpercentageDidChange(value: Float)\nfunc didScratchStarted()\nfunc didScratchEnded()\n```\n\n![sampleGifDPay](ScreenShots/screen_record2.gif)\n\n## Author\n\nGokul, gokulece26@gmail.com\n\n\n## Social\n\n\n*  [Facebook](https://www.facebook.com/gokul.rockzz.1)\n\n*  [Twitter](https://twitter.com/gokulgovind_)\n\n*  [StackOverflow](http://stackoverflow.com/users/5582022/gokul?tab=profile)\n\n*  [Linkedin](https://www.linkedin.com/in/gokul-govind-1b0232105?trk=nav_responsive_tab_profile)\n\n\n## License\n\nGLScratchCard 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%2Fgokulgovind%2Fglscratchcard","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgokulgovind%2Fglscratchcard","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgokulgovind%2Fglscratchcard/lists"}