{"id":31144338,"url":"https://github.com/chris-perkins/numericaltextentry","last_synced_at":"2025-09-18T14:39:45.711Z","repository":{"id":56921134,"uuid":"144306358","full_name":"Chris-Perkins/NumericalTextEntry","owner":"Chris-Perkins","description":"An iOS library for beautiful number entry fields. iPad friendly. Written in Swift.","archived":false,"fork":false,"pushed_at":"2018-08-12T20:10:55.000Z","size":9715,"stargazers_count":15,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-09-12T02:35:09.124Z","etag":null,"topics":["animated","cocoapod","entry","field","ios","ipad","iphone","keyboard","number","numberfield","numerical","pod","swift","text"],"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/Chris-Perkins.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":"2018-08-10T15:56:01.000Z","updated_at":"2024-11-19T16:49:56.000Z","dependencies_parsed_at":"2022-08-21T04:50:40.730Z","dependency_job_id":null,"html_url":"https://github.com/Chris-Perkins/NumericalTextEntry","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/Chris-Perkins/NumericalTextEntry","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Chris-Perkins%2FNumericalTextEntry","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Chris-Perkins%2FNumericalTextEntry/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Chris-Perkins%2FNumericalTextEntry/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Chris-Perkins%2FNumericalTextEntry/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Chris-Perkins","download_url":"https://codeload.github.com/Chris-Perkins/NumericalTextEntry/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Chris-Perkins%2FNumericalTextEntry/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275782402,"owners_count":25527602,"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","status":"online","status_checked_at":"2025-09-18T02:00:09.552Z","response_time":77,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["animated","cocoapod","entry","field","ios","ipad","iphone","keyboard","number","numberfield","numerical","pod","swift","text"],"created_at":"2025-09-18T14:39:44.568Z","updated_at":"2025-09-18T14:39:45.701Z","avatar_url":"https://github.com/Chris-Perkins.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"![](https://github.com/Chris-Perkins/NumericalTextEntry/raw/master/Readme_Imgs/NumericalTextEntryHeader.png)\n\nNumericTextEntry is a powerful, extensible library made for your application's numeric entry needs.\n\nAvailable NumberDisplayer components: \n\n| \u0026nbsp;\u0026nbsp;UIFittedFlatNumberDisplayer \u0026nbsp;\u0026nbsp;\u0026nbsp; | UIFloatingDecimalNumberDisplayer | \u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;UIFlatNumberDisplayer\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; |\n|:---------------------------:|:--------------------------------:|:---------------------:|\n![](https://github.com/Chris-Perkins/NumericalTextEntry/raw/master/Readme_Imgs/UIFittedFlatNumberDisplayer.gif) | ![](https://github.com/Chris-Perkins/NumericalTextEntry/raw/master/Readme_Imgs/UIFloatingDecimalNumberDisplayer.gif) | ![](https://github.com/Chris-Perkins/NumericalTextEntry/raw/master/Readme_Imgs/UIFlatNumberDisplayer.gif)\n\n| Custom Keyboard | Disable Floats\u0026nbsp; |\n|:---------------:|:--------------:|\n![](https://github.com/Chris-Perkins/NumericalTextEntry/raw/master/Readme_Imgs/CustomKeyboard.gif) | ![](https://github.com/Chris-Perkins/NumericalTextEntry/raw/master/Readme_Imgs/DisableFloatEntry.gif)\n\n## Features\n\n✅ Highly extensible  \n✅ iPad friendly--uses a purely numeric keyboard  \n✅ Locale-safe; don't worry about different localization issues  \n✅ Display Numbers using 3 built-in NumberDisplayers (or your own!)  \n✅ Displayers with dynamic-sizing text to always fit your view  \n✅ Injectable NumberFormatter for custom number formatting  \n✅ Set a maximum value for numeric text  \n✅ Ability to hide decimals for text that can be represented by an Int  \n✅ Built-in beautiful, custom keyboard  \n✅ Define whether float values are allowed  \n\n## Installation\n\n1. Install [CocoaPods](https://cocoapods.org)\n1. Add this repo to your `Podfile`\n\n\t```ruby\n\ttarget 'Example' do\n\t\t# IMPORTANT: Make sure use_frameworks! is included at the top of the file\n\t\tuse_frameworks!\n\n\t\tpod 'NumericalTextEntry'\n\tend\n\t```\n1. Run `pod install` in the podfile directory from your terminal\n1. Open up the `.xcworkspace` that CocoaPods created\n1. Done!\n\n## How Do I Work With It?\n\nNumericalTextEntry is intended to be very extensible. Despite its extensibility, NumericalTextEntry is very easy to work with.\n\n### Basics\n\nTo create a numeric text entry field: `let numberField = UINumberEntryField()`\n\nTo get the different values in the number field:  \n```Swift\nlet userInputValue = numberField.rawValue\nlet numericValue = numberField.doubleValue\nlet displayedValue = numberField.displayedStringValue\n```\n\n### Customization\n\nThe following values are customizable for `UINumberEntryFields`:  \n```Swift\n// Cap the maximum value for entry to 987.2 (default  9_999_999_999_999.99; exceeding the default value may cause formatting errors due to double-precision.)\nnumberField.maximumValue = 987.2\n\n// Set the starting value for the number field\nnumberField.startingValue = 37.2\n\n// Determines if decimals should not be in the displayedString if the number can be represented by an integer \n// e.g.: rawValue: \"23\" - formattedNumber: \"23.00\" - displayedNumber: \"23\")\n// e.g. 2: rawValue: \"23.0\" - formattedNumber: \"23.00\" - displayedNumber: \"23.00\"\nnumberField.hideDecimalsIfIntegerValue = false\n\n// Change the number formatter for the view\nnumberField.numberFormatter = userDefinedNumberFormatter\n\n// Change the number displayer.\nnumberField.numberDisplayer = UIFloatingDecimalNumberDisplayer()\nnumberField.numberDisplayer = UIFlatNumberDisplayer()\nnumberField.numberDisplayer = UIFittedFlatNumberDisplayer()\n\n// NumberDisplayer customization: both the UIFloatingDecimalNumberDisplayer and UIFittedFlatNumberDisplayer have toggleable animations.\nlet numberDisplayer = UIFittedFlatNumberDisplayer()\nnumberDisplayer.animated = false\n\n// Custom fonts and text colors are available for every number displayer as well!\nlet numberDisplayer = UIFittedFlatNumberDisplay(withFont: customFont, withTextColor: UIColor.red)\n```\n\nWant to disallow float values? Simply inject a NumberFormatter that doesn't allow floats!  \n```Swift\nlet numberFormatter = NumberFormatter()\nnumberFormatter.allowsFloats = false\nnumberField.numberFormatter = numberFormatter\n```\n\n### Custom NumberDisplayers\n\nWant to create your own NumberDisplayer? Follow this simple protocol!\n\n```Swift\n/// A protocol used to display numbers\npublic protocol UINumberDisplayer {\n    /// Displays the provided value.\n    ///\n    /// - Parameters:\n    ///   - stringToDisplay: The complete string to display.\n    ///   - rawValue: The raw value of the string to display (not formatted)\n    ///   - numberFormatter: The formatter used to generate the stringToDisplay\n    ///   - view: The view where the value should be displayed in\n    /// - Returns: The views that were created to hold the displayed value.\n    func displayValue(_ stringToDisplay: String, withRawString rawString: String,\n                      numberFormatter: NumberFormatter, inView view: UIView) -\u003e [UIView]\n}\n```\n\n### Component Diagram\n\n![](https://github.com/Chris-Perkins/NumericalTextEntry/raw/master/Readme_Imgs/UINumberEntryFieldComponentDiagram.png)\n\n\n## Example\n\nTo run the example project, clone the repo, and run `pod install` from the Example directory first.\n\n## Requirements\n\niOS 10.0 is required.\n\n## Documentation\n\nRead the [docs](https://htmlpreview.github.io/?https://github.com/Chris-Perkins/NumericalTextEntry/blob/master/docs/index.html)\n\n## Author\n\nYa Boi\n\n## License\n\nNumericalTextEntry 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%2Fchris-perkins%2Fnumericaltextentry","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchris-perkins%2Fnumericaltextentry","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchris-perkins%2Fnumericaltextentry/lists"}