{"id":2488,"url":"https://github.com/suzuki-0000/AnimatablePlayButton","last_synced_at":"2025-08-03T00:31:46.731Z","repository":{"id":56901988,"uuid":"47973601","full_name":"suzuki-0000/AnimatablePlayButton","owner":"suzuki-0000","description":"Animated Play and Pause Button written in Swift, using CALayer, CAKeyframeAnimation.","archived":false,"fork":false,"pushed_at":"2020-03-29T16:53:40.000Z","size":38,"stargazers_count":80,"open_issues_count":2,"forks_count":9,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-27T15:40:19.885Z","etag":null,"topics":[],"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/suzuki-0000.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-12-14T12:23:24.000Z","updated_at":"2024-02-25T01:15:45.000Z","dependencies_parsed_at":"2022-08-21T02:50:52.907Z","dependency_job_id":null,"html_url":"https://github.com/suzuki-0000/AnimatablePlayButton","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/suzuki-0000%2FAnimatablePlayButton","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suzuki-0000%2FAnimatablePlayButton/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suzuki-0000%2FAnimatablePlayButton/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suzuki-0000%2FAnimatablePlayButton/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/suzuki-0000","download_url":"https://codeload.github.com/suzuki-0000/AnimatablePlayButton/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228510693,"owners_count":17931750,"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-01-05T20:16:14.982Z","updated_at":"2024-12-06T18:30:28.645Z","avatar_url":"https://github.com/suzuki-0000.png","language":"Swift","funding_links":[],"categories":["UI","Button","Libs","Swift"],"sub_categories":["Button","Other free courses","UI"],"readme":"AnimatablePlayButton\n========================\n\n[![Carthage Compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)\n[![CocoaPods Compatible](https://img.shields.io/cocoapods/v/AnimatablePlayButton.svg?style=flat)](http://cocoadocs.org/docsets/AnimatablePlayButton)\n[![Swift 2.0](https://img.shields.io/badge/Swift-2.0-orange.svg?style=flat)](https://developer.apple.com/swift/)\n\nAnimated Play and Pause Button written in Swift, using CALayer, CAKeyframeAnimation.\n\n![sample](Screenshots/example01.gif)\n\n## features\n- Only using CAShapeLayer, CAKeyframeAnimation. not from image object.\n\n## Requirements\n- iOS 8.0+\n- Swift 2.0+\n- ARC\n\n##Installation\n\n####CocoaPods\navailable on CocoaPods. Just add the following to your project Podfile:\n```\npod 'AnimatablePlayButton'\nuse_frameworks!\n```\n\n####Carthage\nTo integrate into your Xcode project using Carthage, specify it in your Cartfile:\n\n```ogdl\ngithub \"suzuki-0000/AnimatablePlayButton\"\n```\n\n## How to use\n#### 1. Create a button, specify backgroundColor of Button(bgColor), and button color(color).\n```swift\nlet button = AnimatablePlayButton(frame: CGRectMake(0, 0, 44, 44))\nbutton.bgColor = .blackColor()\nbutton.color = .whiteColor()\nself.view.addSubview(button)\n```\n\n#### 2. Add tapped function\n```swift\nbutton.addTarget(self, action: Selector(\"tapped:\"), forControlEvents: .TouchUpInside)\n```\n```swift\nfunc tapped(sender: AnimatablePlayButton) {\n    if sender.selected {\n        sender.deselect()\n    } else {\n        sender.select()\n    }\n}\n```\n\n## License\navailable under the MIT license. See the LICENSE file for more info.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsuzuki-0000%2FAnimatablePlayButton","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsuzuki-0000%2FAnimatablePlayButton","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsuzuki-0000%2FAnimatablePlayButton/lists"}