{"id":23082547,"url":"https://github.com/datt1994/dpotpview","last_synced_at":"2025-08-16T00:31:28.753Z","repository":{"id":36148040,"uuid":"221703884","full_name":"Datt1994/DPOTPView","owner":"Datt1994","description":"Customisable OTP view and Passcode view","archived":false,"fork":false,"pushed_at":"2025-07-16T06:43:14.000Z","size":15169,"stargazers_count":69,"open_issues_count":8,"forks_count":21,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-08-03T14:12:08.672Z","etag":null,"topics":["ios","otp","otp-applications","otp-field","otp-textfield","otp-verification","otp-view","otpauth","otptextfield","otptextview","passcode","passcode-input","passcode-viewcontroller","passcodelock","passcodeview","pin","swift","verification","verification-code","verificationcode"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Datt1994.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":"2019-11-14T13:27:14.000Z","updated_at":"2025-07-16T06:43:18.000Z","dependencies_parsed_at":"2022-08-20T19:20:22.541Z","dependency_job_id":null,"html_url":"https://github.com/Datt1994/DPOTPView","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/Datt1994/DPOTPView","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Datt1994%2FDPOTPView","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Datt1994%2FDPOTPView/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Datt1994%2FDPOTPView/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Datt1994%2FDPOTPView/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Datt1994","download_url":"https://codeload.github.com/Datt1994/DPOTPView/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Datt1994%2FDPOTPView/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270651062,"owners_count":24622439,"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-08-15T02:00:12.559Z","response_time":110,"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":["ios","otp","otp-applications","otp-field","otp-textfield","otp-verification","otp-view","otpauth","otptextfield","otptextview","passcode","passcode-input","passcode-viewcontroller","passcodelock","passcodeview","pin","swift","verification","verification-code","verificationcode"],"created_at":"2024-12-16T14:54:49.284Z","updated_at":"2025-08-16T00:31:28.279Z","avatar_url":"https://github.com/Datt1994.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DPOTPView\n[![Platform](https://img.shields.io/cocoapods/p/DPOTPView.svg?style=flat)](http://cocoapods.org/pods/DPOTPView)\n[![Language: Swift 5](https://img.shields.io/badge/language-swift5-f48041.svg?style=flat)](https://developer.apple.com/swift)\n[![License](https://img.shields.io/cocoapods/l/DPOTPView.svg?style=flat)](https://github.com/Datt1994/DPOTPView/blob/master/LICENSE)\n[![Version](https://img.shields.io/cocoapods/v/DPOTPView.svg?style=flat)](http://cocoapods.org/pods/DPOTPView)\n[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)\n\n![Look](https://github.com/Datt1994/DPOTPView/raw/master/Look.png)\n\nCustomisable OTP view and Passcode view\n\n## Installation with CocoaPods\n\n[CocoaPods](http://cocoapods.org) is a dependency manager for Objective-C \u0026 Swift. You can install it with the following command:\n\n```bash\n$ gem install cocoapods\n```\n#### Podfile\n\nTo integrate DPOTPView into your Xcode project using CocoaPods, specify it in your `Podfile`:\n\n```ruby\nsource 'https://github.com/CocoaPods/Specs.git'\nplatform :ios, '8.0'\n\ntarget 'TargetName' do\nuse_frameworks!\npod 'DPOTPView'\nend\n```\n\nThen, run the following command:\n\n```bash\n$ pod install\n```\n\n## Installation with Carthage\n\n[Carthage](https://github.com/Carthage/Carthage) is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks.\n\nYou can install Carthage with [Homebrew](http://brew.sh/) using the following command:\n\n```bash\n$ brew update\n$ brew install carthage\n```\n\nTo integrate `DPOTPView` into your Xcode project using Carthage, specify it in your `Cartfile`:\n\n```ogdl\ngithub \"Datt1994/DPOTPView\"\n```\n\nRun `carthage` to build the framework and drag the framework (`DPOTPView.framework`) into your Xcode project.\n\nNote: [IBDesignables and IBInspectables](https://github.com/Carthage/Carthage/issues/335) will not work in interface builder.\n\nWorkaround: Create IBDesignable subclass of DPOTPView, Use this subclass as custom calss in interface builder.\n```swift\n@IBDesignable\nclass OTPView : DPOTPView {}    \n```\n\n## Installation with Swift Package Manager\n\nThe [Swift Package Manager](https://swift.org/package-manager/) is a tool for automating the distribution of Swift code and is integrated into the `swift` compiler.\n\nTo add the library as package dependency to your Xcode project, select File \u003e Swift Packages \u003e Add Package Dependency and enter its repository URL `https://github.com/Datt1994/DPOTPView.git`\n\n\n## Add Manually \n  \n  Download Project and copy-paste `DPOTPView.swift` file into your project \n\n## How to use\n![AddClass](https://github.com/Datt1994/DPOTPView/raw/master/Add%20Class.png)\n\n👆Add DPOTPView to UIView Custom Class.\n\n![Properties](https://github.com/Datt1994/DPOTPView/raw/master/Property.png)\n\n👆Use this properties as per your requirments.\n\n## Code\n\n**Set up through code**\n```swift\nlet txtOTPView = DPOTPView(frame: CGRect(x: (self.view.frame.width - 250)/2, y: txtDPOTPView.frame.origin.y + 50, width: 250, height: 60))\ntxtOTPView.count = 5\ntxtOTPView.spacing = 10\ntxtOTPView.fontTextField = UIFont(name: \"HelveticaNeue-Bold\", size: CGFloat(25.0))!\ntxtOTPView.dismissOnLastEntry = true\ntxtOTPView.borderColorTextField = .black\ntxtOTPView.selectedBorderColorTextField = .blue\ntxtOTPView.borderWidthTextField = 2\ntxtOTPView.backGroundColorTextField = .lightGray\ntxtOTPView.cornerRadiusTextField = 8\ntxtOTPView.isCursorHidden = true\n//txtOTPView.isSecureTextEntry = true\n//txtOTPView.isBottomLineTextField = true\n//txtOTPView.isCircleTextField = true\nview.addSubview(txtOTPView)\n```\n\n**Usage**\n```swift\ntxtDPOTPView.text = \"1234\" // set text\nprint(txtDPOTPView.text ?? \"\") // get text\ntxtDPOTPView.validate() // validate all text entry\n_ = txtDPOTPView.becomeFirstResponder()\n```\n\n**Delegate Methods**\n```swift\nextension ViewController : DPOTPViewDelegate {\n   func dpOTPViewAddText(_ text: String, at position: Int) {\n        print(\"addText:- \" + text + \" at:- \\(position)\" )\n    }\n    \n    func dpOTPViewRemoveText(_ text: String, at position: Int) {\n        print(\"removeText:- \" + text + \" at:- \\(position)\" )\n    }\n    \n    func dpOTPViewChangePositionAt(_ position: Int) {\n        print(\"at:-\\(position)\")\n    }\n    func dpOTPViewBecomeFirstResponder() {\n        \n    }\n    func dpOTPViewResignFirstResponder() {\n        \n    }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatt1994%2Fdpotpview","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdatt1994%2Fdpotpview","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatt1994%2Fdpotpview/lists"}