kenagt / OtpView-SwiftUI

Otp view swift package implemented with swift & SwiftUI.
GNU General Public License v3.0
1 stars 2 forks source link

OtpView-SwiftUI

Otp view swift package implemented with Swift & SwiftUI.

How to use

Create an instance It supports AutoLayout completely.

@State var otpCode: String = ""
@State var otpCodeLength: Int = 6
@State var textColor = .black
@State var textSize = CGFloat(27)

var body: some View {
    HStack {
        //OTPTextField { otp, completionHandler in }
        OtpView_SwiftUI(otpCode: $otpCode, otpCodeLengh: $otpCodeLength, textColor: $textColor, textSize: $textSize)
    }
}

Requirements

iOS 15.0+ Swift 5.5+

Installation