{"id":18763683,"url":"https://github.com/inloop/pinindicatorview","last_synced_at":"2025-04-13T04:32:50.017Z","repository":{"id":56937433,"uuid":"122214188","full_name":"inloop/PinIndicatorView","owner":"inloop","description":"A simple UI component that mimics the lock screen pin indicator","archived":false,"fork":false,"pushed_at":"2018-02-21T07:44:25.000Z","size":15,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":10,"default_branch":"master","last_synced_at":"2024-10-15T04:06:06.532Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/inloop.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-02-20T15:09:24.000Z","updated_at":"2022-08-10T02:41:19.000Z","dependencies_parsed_at":"2022-08-21T06:50:13.356Z","dependency_job_id":null,"html_url":"https://github.com/inloop/PinIndicatorView","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inloop%2FPinIndicatorView","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inloop%2FPinIndicatorView/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inloop%2FPinIndicatorView/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inloop%2FPinIndicatorView/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/inloop","download_url":"https://codeload.github.com/inloop/PinIndicatorView/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223567128,"owners_count":17166442,"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-11-07T18:27:05.733Z","updated_at":"2024-11-07T18:27:06.948Z","avatar_url":"https://github.com/inloop.png","language":"Swift","readme":"![Pin view sample](https://www.dropbox.com/s/kmyida8ryiy4e9w/PinIndicatorView.png?raw=1)\n\n# PinIndicatorView\nA simple UI component that mimics the lock screen pin indicator\n\n## Usage\nImport the framework\n```\nimport PinIndicatorView\n```\n\nAdd the `PinIndicatorView` view to your storyboard and create an outlet\n```\n@IBOutlet weak var pinIndicator: PinIndicatorView!\n```\n\nYou can set the required number of digits and the colour. The defaults are 4 and blue. You can either set this programatically or in your storyboard\n```\npinIndicator.digitCount = 8\npinIndicator.color = .green\n```\n\nFill or unfill the indicator when digit or backspace buttons are pressed\n```\npinIndicator.addDigit()\npinIndicator.deleteDigit()\n```\n\nYou can check if the required number of digits was inputted\n```\npinIndicator.isFilled\n```\n\nIf your validation fails trigger the shake animation and clear the indicator\n```\npinIndicator.shake()\npinIndicator.clear()\n```\n\n## Instalation\nThe library is available on cocoapods\n```\npod 'PinIndicatorView', '~\u003e 1.0'\n```\n\n## Customisation\nYou can customise the indicator by supplying a custom renderer. The renderer implements the `IndicatorRenderer` protocol and is assigned to the `renderer` property of the indicator.\n```\nclass MyIndicatorRenderer: IndicatorRenderer {\n   func renderFilled(in rect: CGRect, context: CGContext) {\n      // TODO: Draw the filled shape\n   }\n\n   func renderEmpty(in rect: CGRect, context: CGContext) {\n      // TODO: Draw the outline\n   }\n}\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finloop%2Fpinindicatorview","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finloop%2Fpinindicatorview","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finloop%2Fpinindicatorview/lists"}