Latest 0.1.0
Homepage https://github.com/anuranBarman/ABOtpView
License MIT
Platforms ios 8.0
Frameworks UIKit
Authors

CI Status
Version
License
Platform

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

Installation

ABOtpView is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod 'ABOtpView'

Screenshot

Screenshot

Usage

class ViewController: UIViewController,ABOtpViewDelegate {

        override func viewDidLoad() {
            super.viewDidLoad()

            let label = UILabel(frame: CGRect(x: 0, y: 50, width:UIScreen.main.bounds.size.width, height: 60))
            label.text = "ABOtpView"
            label.font = UIFont.boldSystemFont(ofSize: 50.0)
            label.textColor = .black
            label.textAlignment = .center

            self.view.addSubview(label)

            let otpView = ABOtpView(frame: CGRect(x: 0, y: 200, width: UIScreen.main.bounds.size.width, height: 60), numberOfDigits: 6,     borderType: .ROUND, borderColor: .blue,delegate:self)
            self.view.addSubview(otpView)

            let otpView2 = ABOtpView(frame: CGRect(x: 0, y: 300, width: UIScreen.main.bounds.size.width, height: 60), numberOfDigits: 4, borderType: .SEMI_ROUND, borderColor: .red,delegate:self)
            self.view.addSubview(otpView2)

            let otpView3 = ABOtpView(frame: CGRect(x: 0, y: 400, width: UIScreen.main.bounds.size.width, height: 60), numberOfDigits: 5, borderType: .SQUARE, borderColor: .black,delegate:self)

           self.view.addSubview(otpView3)

        }

        func didEnterOTP(otp: String) {
            print(otp)
        }

}

Author

anuranBarman, [email protected]

License

ABOtpView is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "ABOtpView",
    "version": "0.1.0",
    "summary": "A readymade view for validating your OTP",
    "description": "A readymade view to validate your OTP with border color, border style and delegate method to validate the OTP",
    "homepage": "https://github.com/anuranBarman/ABOtpView",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "anuranBarman": "[email protected]"
    },
    "source": {
        "git": "https://github.com/anuranBarman/ABOtpView.git",
        "tag": "0.1.0"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "ABOtpView/Classes/**/*",
    "swift_version": "4.2",
    "frameworks": "UIKit"
}

Pin It on Pinterest

Share This