{"id":2781,"url":"https://github.com/zigzagg16/barceloneta","last_synced_at":"2025-03-30T00:30:36.922Z","repository":{"id":56931666,"uuid":"59054798","full_name":"zigzagg16/barceloneta","owner":"zigzagg16","description":"The right way to increment/decrement values with a simple gesture on iOS.","archived":true,"fork":false,"pushed_at":"2019-02-07T16:03:16.000Z","size":2785,"stargazers_count":71,"open_issues_count":0,"forks_count":4,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-05-29T04:52:44.889Z","etag":null,"topics":["gesture","incrementation","ios","ios-animation","ios-ui","swift-3","swift-library","ui-components"],"latest_commit_sha":null,"homepage":"http://arn00s.github.io/barceloneta/","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/zigzagg16.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":"2016-05-17T20:05:13.000Z","updated_at":"2024-04-02T17:40:45.000Z","dependencies_parsed_at":"2022-08-21T00:00:31.110Z","dependency_job_id":null,"html_url":"https://github.com/zigzagg16/barceloneta","commit_stats":null,"previous_names":["zigzagg16/barceloneta","arn00s/barceloneta"],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zigzagg16%2Fbarceloneta","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zigzagg16%2Fbarceloneta/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zigzagg16%2Fbarceloneta/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zigzagg16%2Fbarceloneta/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zigzagg16","download_url":"https://codeload.github.com/zigzagg16/barceloneta/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246262490,"owners_count":20749170,"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":["gesture","incrementation","ios","ios-animation","ios-ui","swift-3","swift-library","ui-components"],"created_at":"2024-01-05T20:16:22.690Z","updated_at":"2025-03-30T00:30:34.379Z","avatar_url":"https://github.com/zigzagg16.png","language":"Swift","readme":"barceloneta\n===============\n\n[![CocoaPods Compatible](https://img.shields.io/cocoapods/v/barceloneta.svg)](https://img.shields.io/cocoapods/v/barceloneta.svg)\n[![Awesome](https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg)](https://github.com/sindresorhus/awesome)\n[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](http://makeapullrequest.com)\n\nThe right way to increment/decrement values\n\n![](https://raw.githubusercontent.com/arn00s/barceloneta/master/img/barceloneta.gif)\n\nbarceloneta is the right way to increment/decrement values with a simple gesture on iOS\n\n## Features\n\n- Customisation for timer and incremental values\n- Easily customisable\n- Horizontal/vertical mode\n- Looping through values or not\n- Customizable dragging limit\n- Minimal/maximal values\n- [Complete Documentation](http://arn00s.github.io/barceloneta/)\n\n## Requirements\n\n- Autolayout\n- iOS 9.0+\n- Swift 3.0\n- Xcode 8.0 or higher\n\n## Communication\n\n- If you **need help**, use [Stack Overflow](http://stackoverflow.com/questions/tagged/barceloneta). (Tag '#barceloneta')\n- If you'd like to **ask a general question**, use [Stack Overflow](http://stackoverflow.com/questions/tagged/barceloneta).\n- If you **found a bug**, open an issue.\n- If you **have a feature request**, open an issue.\n- If you **want to contribute**, submit a pull request.\n- If you **use the control**, contact me to mention your app on this page.\n\n## Installation\n\n### CocoaPods\nBarceloneta is now available on [CocoaPods](http://cocoapods.org).\nSimply add the following to your project Podfile, and you'll be good to go.\n\n```ruby\nuse_frameworks!\n\npod 'barceloneta', '~\u003e 1.1'\n```\n\n### Carthage\n\nComing soon\n\n### Manually\n\nYou can integrate `barceloneta` into your project manually.\n\n#### Source File\n\nSimply add the `Library/Barceloneta.swift` source file directly into your project.\n\n---\n\n## Usage\n\n### Enabling the gesture (EASY !)\nTo enable the gesture, it is required to have :\n- A UIView object\n- A NSLayoutConstraint applied to the view, for the vertical position of the view\n- Timer/Incremental settings\n- A delegate (optional)\n\n```swift\n//Initialise the gesture\nbarcelonetaView.loops = true\nbarcelonetaView.minimumValue = 0.0\nbarcelonetaView.maximumValue = 50.0\nlet timerSettings = [\n    (range: 0..\u003c70, timer: 0.3, increment: 1.0),\n    (range: 70..\u003c120, timer: 0.2, increment: 2.0),\n    (range: 120..\u003c500, timer: 0.1, increment: 3.0)\n]\nbarcelonetaView.makeElastic(timerSettings: timerSettings,\n                            constraint: myNSLayoutConstraint\n                            axis: .vertical,\n                            delegate: self)\n```\n\n### Configuration\n\n\u003e That's where the fun begins.\n\u003e Keep in mind that the goal of this library is only to manage the incrementation of values. The display should be managed by you.\n\n#### Looping of values\n\nDetermines if the values will stop on minimumValue/maximumValue.\n\nIf looping is enabled, when the maximum value is reached, it will go back to the mimimum value.\n\nAnd vice-versa.\n\n```swift\nbarcelonetaView.loops = true/false\n```\n\n#### Minimum/Maximum values\nDetermines the limits of the increment\n\n```swift\nbarcelonetaView.minimumValue = 0.0\nbarcelonetaView.maximumValue = 50.0\n```\n\n#### Dragging limit\nThis value defines the dragging limit of your `barceloneta` object. If the user drags the view higher than this limit, a rubber effect will apply. The view will go up/down slower than your finger.\n\n```swift\nbarcelonetaView.draggingLimit = 50.0\n```\n\n#### Timer Settings\n\nThe timerSettings property is an array of objects, defining the timer interval and incremental value for a specific range.\nIt is required to have at least an object in the timer setting.\n\nDepending on the percentage, the matching settings will be applied.\n\nA drag of 100% corresponds to the draggingLimit.\n\n```swift\n(range:0..\u003c70, timer: 0.3, increment: 1.0)\n```\nThis setting says that :\n\nBetween `0` and `70%`, the timer interval for incrementation is `0.3 seconds`, and the value incremented is `1.0`.\n\n![](https://raw.githubusercontent.com/arn00s/barceloneta/master/img/barceloneta_explanation.png)\n\n#### Crash when running the app ?\n\nIf you installed `barceloneta` via CocoaPods and use it with Storyboard/xib, you may need to set the module :\n\n![](https://raw.githubusercontent.com/arn00s/barceloneta/master/img/custom-module-storyboard.png)\n\n## TODO\n\n- UI Testing\n\n## Known issues\n\nCheck the ([GitHub issues](https://github.com/arn00s/barceloneta/issues))\n\n## FAQ\n\n### Why should I use `Barceloneta`?\n\nYou're looking for an innovative way to increment/decrement values\n\n\n## Special thanks\n\n[RuberBandEffect](https://github.com/Produkt/RubberBandEffect)\n\n## Contact\n\n- [LinkedIn](https://lu.linkedin.com/in/arnaudschloune)\n- [twitter](https://twitter.com/mmommommomo)\n\n### Creator\n\n- [Arnaud Schloune](http://github.com/arn00s)\n\n## License\n\nBarceloneta is released under the MIT license. See LICENSE for details.\n","funding_links":[],"categories":["UI"],"sub_categories":["Stepper","Layout","Other free courses"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzigzagg16%2Fbarceloneta","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzigzagg16%2Fbarceloneta","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzigzagg16%2Fbarceloneta/lists"}