{"id":2983,"url":"https://github.com/TBXark/TKRubberIndicator","last_synced_at":"2025-08-03T12:31:49.649Z","repository":{"id":41562676,"uuid":"45082974","full_name":"TBXark/TKRubberIndicator","owner":"TBXark","description":"A rubber animation pagecontrol","archived":false,"fork":false,"pushed_at":"2023-02-17T05:43:17.000Z","size":981,"stargazers_count":1422,"open_issues_count":7,"forks_count":171,"subscribers_count":40,"default_branch":"master","last_synced_at":"2024-04-24T18:58:21.658Z","etag":null,"topics":["carthage","cocoapods","coreanimation","ios","ios-animation","page-control","swift","ui","uikit"],"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/TBXark.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,"governance":null}},"created_at":"2015-10-28T02:14:22.000Z","updated_at":"2024-04-16T15:08:36.000Z","dependencies_parsed_at":"2022-08-21T04:50:27.501Z","dependency_job_id":"575c92f7-c310-4a40-a688-68838c6ee7e9","html_url":"https://github.com/TBXark/TKRubberIndicator","commit_stats":{"total_commits":56,"total_committers":2,"mean_commits":28.0,"dds":0.3214285714285714,"last_synced_commit":"293712f43e2dee5a16c5f8927416b95c68d9b3ec"},"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TBXark%2FTKRubberIndicator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TBXark%2FTKRubberIndicator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TBXark%2FTKRubberIndicator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TBXark%2FTKRubberIndicator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TBXark","download_url":"https://codeload.github.com/TBXark/TKRubberIndicator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228543234,"owners_count":17934449,"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":["carthage","cocoapods","coreanimation","ios","ios-animation","page-control","swift","ui","uikit"],"created_at":"2024-01-05T20:16:28.127Z","updated_at":"2024-12-07T00:31:09.333Z","avatar_url":"https://github.com/TBXark.png","language":"Swift","funding_links":[],"categories":["UI","PageControl","Content","Swift"],"sub_categories":["UIPageControl","Segment Control","Other free courses","Activity Indicator"],"readme":"# TKRubberIndicator\n\u003e A rubber animation pagecontrol\n\n![Xcode 9.0+](https://img.shields.io/badge/Xcode-9.0%2B-blue.svg)\n![iOS 8.0+](https://img.shields.io/badge/iOS-8.0%2B-blue.svg)\n![Swift 4.0+](https://img.shields.io/badge/Swift-4.0%2B-orange.svg)\n[![Build Status](https://travis-ci.org/TBXark/TKRubberIndicator.svg?branch=master)](https://travis-ci.org/TBXark/TKRubberIndicator)\n[![CocoaPods](http://img.shields.io/cocoapods/v/TKRubberPageControl.svg?style=flat)](http://cocoapods.org/?q=TKRubberPageControl)\n[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)\n[![License MIT](https://img.shields.io/badge/license-MIT-green.svg?style=flat)](https://raw.githubusercontent.com/TBXark/TKRubberIndicator/master/LICENSE)\n\n\n![](/Example/demo.gif)\n\n## Requirements\n\n- Swift 4.0\n- iOS 8.0+\n- Xcode 9.0\n\n## Installation\n\n#### CocoaPods\nYou can use [CocoaPods](http://cocoapods.org/) to install `TKRubberPageControl` by adding it to your `Podfile`:\n\n```ruby\nplatform :ios, '8.0'\nuse_frameworks!\npod 'TKRubberPageControl'\n```\n\nTo get the full benefits import `TKRubberPageControl` wherever you import UIKit\n\n``` swift\nimport UIKit\nimport TKRubberPageControl\n```\n#### Carthage\nCreate a `Cartfile` that lists the framework and run `carthage update`. Follow the [instructions](https://github.com/Carthage/Carthage#if-youre-building-for-ios) to add `$(SRCROOT)/Carthage/Build/iOS/TKRubberPageControl.framework` to an iOS project.\n\n```\ngithub \"tbxark/TKRubberIndicator\"\n```\n#### Manually\n1. Download and drop ```TKRubberPageControl.swift``` in your project.  \n2. Congratulations!  \n\n## Usage example\n\nYou can use closure or Target-Action to listen control event\n\n```swift\nclass ViewController: UIViewController {\n\n    let page = TKRubberIndicator(frame: CGRectMake(100, 100, 200, 100), count: 6)\n\n    override func viewDidLoad() {\n        super.viewDidLoad()\n\n\n        self.view.backgroundColor = UIColor(red:0.553,  green:0.376,  blue:0.549, alpha:1)\n        page.center = self.view.center\n        page.valueChange = {(num) -\u003e Void in\n            print(\"Closure : Page is \\(num)\")\n        }\n        page.addTarget(self, action: \"targetActionValueChange:\", forControlEvents: UIControlEvents.ValueChanged)\n        self.view.addSubview(page)\n\n        page.numberOfpage = 2\n    }\n\n    @IBAction func pageCountChange(sender: UISegmentedControl) {\n        page.numberOfpage = (sender.selectedSegmentIndex + 1) * 2\n    }\n    func targetActionValueChange(page:TKRubberIndicator){\n        print(\"Target-Action : Page is \\(page.currentIndex)\")\n    }\n\n    override func didReceiveMemoryWarning() {\n        super.didReceiveMemoryWarning()\n    }\n}\n\n```\n\n### Base\n\n|Key | Usage| |\n|---|---|---|\n|smallBubbleSize|未选中小球尺寸|unselect  small ball size|\n|mainBubbleSize|选中大球尺寸|select big ball size|\n|bubbleXOffsetSpace|小球间距|The distance between the ball|\n|bubbleYOffsetSpace|纵向间距|bubble Y Offset Space|\n|animationDuration|动画时长|animation duration|\n|backgroundColor|背景颜色|control background color|\n|smallBubbleColor|小球颜色|unselect small ball color|\n|mainBubbleColor|大球颜色|select big ball color|\n\n\n## Release History\n\n* 1.4.0\n  Swift 4.0\n\n* 1.3.1\n  Bug Fixed\n\n* 1.3.0\n  Support Swift 3.0\n\n* 1.0.5\n  Fix bug, add Cocoapod and Carthage support\n\n* 1.0.4\n  Complete basic functions\n\n## Contribute\n\nWe would love for you to contribute to **TKRubberPageControl**, check the ``LICENSE`` file for more info.\n\n## Meta\n\nTBXark – [@tbxark](https://twitter.com/tbxark) – tbxark@outlook.com\n\nDistributed under the MIT license. See ``LICENSE`` for more information.\n\n[https://github.com/TBXark](https://github.com/TBXark)\n\n[swift-image]:https://img.shields.io/badge/swift-3.0-orange.svg\n[swift-url]: https://swift.org/\n[license-image]: https://img.shields.io/badge/License-MIT-blue.svg\n[license-url]: LICENSE\n[travis-image]: https://img.shields.io/travis/dbader/node-datadog-metrics/master.svg?style=flat-square\n[travis-url]: https://travis-ci.org/dbader/node-datadog-metrics\n[codebeat-image]: https://codebeat.co/badges/c19b47ea-2f9d-45df-8458-b2d952fe9dad\n[codebeat-url]: https://codebeat.co/projects/github-com-vsouza-awesomeios-com\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FTBXark%2FTKRubberIndicator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FTBXark%2FTKRubberIndicator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FTBXark%2FTKRubberIndicator/lists"}