{"id":2760,"url":"https://github.com/TomThorpe/TTRangeSlider","last_synced_at":"2025-08-03T12:31:03.237Z","repository":{"id":29672207,"uuid":"33214457","full_name":"TomThorpe/TTRangeSlider","owner":"TomThorpe","description":"A slider, similar in style to UISlider, but which allows you to pick a minimum and maximum range.","archived":false,"fork":false,"pushed_at":"2021-09-19T10:13:44.000Z","size":541,"stargazers_count":968,"open_issues_count":27,"forks_count":203,"subscribers_count":18,"default_branch":"master","last_synced_at":"2024-12-06T19:10:33.032Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Objective-C","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/TomThorpe.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-03-31T22:50:02.000Z","updated_at":"2024-11-27T09:39:09.000Z","dependencies_parsed_at":"2022-08-20T22:20:15.371Z","dependency_job_id":null,"html_url":"https://github.com/TomThorpe/TTRangeSlider","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TomThorpe%2FTTRangeSlider","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TomThorpe%2FTTRangeSlider/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TomThorpe%2FTTRangeSlider/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TomThorpe%2FTTRangeSlider/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TomThorpe","download_url":"https://codeload.github.com/TomThorpe/TTRangeSlider/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228517164,"owners_count":17932435,"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:22.109Z","updated_at":"2024-12-07T00:30:50.967Z","avatar_url":"https://github.com/TomThorpe.png","language":"Objective-C","funding_links":[],"categories":["UI","etc"],"sub_categories":["Slider","Layout","Other free courses"],"readme":"# TTRangeSlider\n[![Build Status](https://travis-ci.org/TomThorpe/TTRangeSlider.svg?branch=master)](https://travis-ci.org/TomThorpe/TTRangeSlider) [![Version](https://img.shields.io/cocoapods/v/TTRangeSlider.svg?style=flat)](http://cocoadocs.org/docsets/TTRangeSlider)\n[![License](https://img.shields.io/cocoapods/l/TTRangeSlider.svg?style=flat)](http://cocoadocs.org/docsets/TTRangeSlider)\n[![Platform](https://img.shields.io/cocoapods/p/TTRangeSlider.svg?style=flat)](http://cocoadocs.org/docsets/TTRangeSlider)\n\nA slider, similar in style to UISlider, but which allows you to pick a minimum and maximum range.\n\n![Screenshot](Example/TTRangeSlider.gif)\n## Installation\nTTRangeSlider is available through [CocoaPods](http://cocoapods.org). To install\nit, simply add the following line to your Podfile:\n\n```ruby\npod \"TTRangeSlider\"\n```\n\nNote that this control uses IB_DESIGNABLE, so for it to work well and not get warnings in Interface Builder, you should use the latest version of CocoaPods, and add the `use_frameworks!` line. So your podfile may look something like\n\n```ruby\nsource 'https://github.com/CocoaPods/Specs.git'\nuse_frameworks!\n\npod “TTRangeSlider”\n```\n\n## Usage\n\nAdd the TTRangeSlider like you would with any other UIControl. Either:\n* Add a view in your storyboard/class and change it’s type to `TTRangeSlider`. As long as you’re using \u003e= XCode6 you can now use this control like any other, you can set all the properties in the Attributes Inspector and see a live preview:\n\n![Interface Builder Screenshot](Example/interfacebuilder.png)\n\nor\n* Create the `TTRangeSlider` in code using `[TTRangeSlider alloc] init]` then add it as a subview to your code and set the relevant autolayout properties or frame.\n\nThe default slider ranges from 0-\u003e100 and has 10 preselected as the minimum, and 90 as the maximum. \n\nValues that the user has selected are exposed using the `selectedMinimum` and `selectedMaximum` properties. You can also use these properties to change the selected values programatically if you wish.\n\n## Getting updates\n\nTo be notified when the slider’s value changes, register your action method with the `UIControlEventValueChanged` event. At runtime, the slider calls your method in response to the user changing the slider’s value.\n\nAlternatively you can implement the `TTRangeSliderDelegate` protocol and respond to changes in the `rangeSlider:didChangeSelectedMinimumValue:andMaximumValue:` method.\n\nOther customisation of the control is done using the following properties:\n#### `tintColor`\nThe tintColor property (which you can also set in Interface Builder) sets the overall colour of the control, including the colour of the line, the two handles, and the labels.\n\nIt is safe to change the `tintColor` at any time, if the control is currently visible the colour change will be animated into the new colour.\n#### `tintColorBetweenHandles`\nThe tintColorBetweenHandles property sets the color of the line between the two handles.\n#### `minValue`\nThe minimum possible value to select in the range\n#### `maxValue`\nThe maximum possible value to select in the range\n#### `selectedMinimum`\nThe preselected minumum value (note: This should be less than the selectedMaximum)\n#### `selectedMaximum`\nThe preselected maximum value (note: This should be greater than the selectedMinimum)\n#### `numberFormatterOverride`\nEach handle in the slider has a label above it showing the current selected value. By default, this is displayed as a decimal format.\n\nYou can override this default here by supplying your own NSNumberFormatter. For example, you could supply an NSNumberFormatter that has a currency style, or a prefix or suffix.\n\nIf this property is nil, the default decimal format will be used. Note: If you want no labels at all, set this value to be `(NSNumberFormatter *)[NSNull null]` (as opposed to nil), to specifically mark that you want no labels\n#### `hideLabels`\nWhen set to `YES` the labels above the slider controls will be hidden. Default is NO.\n#### `minDistance`\nThe minimum distance the two selected slider values must be apart. -1 for no minimum. Default is -1.\n#### `maxDistance`\nThe maximum distance the two selected slider values must be apart. -1 for no maximum. Default is -1.\n#### `minLabelColour`\nThe colour of the minimum value text label. If not set, the default is the tintColor.\n#### `maxLabelColour`\nThe colour of the maximum value text label. If not set, the default is the tintColor.\n#### `disableRange`\nIf true, the control will mimic a normal slider and have only one handle rather than a range.\n\nIn this case, the selectedMinValue will be not functional anymore. Use selectedMaxValue instead to determine the value the user has selected.\n#### `enableStep`\nIf true the control will snap to point at each `step` (property) between minValue and maxValue. Default value is disabled.\n#### `step`\nIf `enableStep` is true, this controls the value of each step. E.g. if this value is 20, the control will snap to values 20,40,60...etc. Set this is you enable the `enableStep` property.\n#### `handleImage`\nIf set the image passed will be used for the handles.\n#### `handleColor`\nIf set it will update the color of the handles. Default is `tintColor`.\n#### `handleDiameter`\nIf set it will update the size of the handles. Default is `16.0`.\n#### `selectedHandleDiameterMultiplier`\nIf set it update the scaling factor of the handle when selected. Default is `1.7`. If you don't want any scaling, set it to `1.0`.\n#### `lineHeight`\nSet the height of the line. It will automatically round the corners. If not specified, the default value will be `1.0`.\n#### `lineBorderWidth`\nSets an optional border on the outer lines (not the line inside the range) of the slider. Default is 0.\n#### `lineBorderColor`\nIf `lineBorderWidth`, set the colour of the line here.\n#### `handleBorderColor`\nIf set it will update the color of the handle borders. Default is `tintColor`.\n#### `handleBorderWidth`\nIf set it will update the size of the handle borders. Default is `0.0`\n#### `labelPadding`\nIf set it will update the size of the padding between label and handle. Default is `8.0`\n\n## Author\n\nTom Thorpe\n\n## License\n\nTTRangeSlider 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%2FTomThorpe%2FTTRangeSlider","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FTomThorpe%2FTTRangeSlider","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FTomThorpe%2FTTRangeSlider/lists"}