OtpResendButton

"Resend code" button with a countdown. The host owns the timer and sets secondsRemaining; the button is disabled while it is above zero. The countdown text is the visible text and therefore also the accessible name (WCAG 2.5.3 Label in Name). There is no per-second announcement; verify the VoiceOver behavior on a device.

Hosts should not make resend permanently unavailable and should let users request more time or another code (WCAG 2.2.1 Timing Adjustable). Use the same alignment as OtpField.

Constructors

Link copied to clipboard
constructor(accessibility: OtpResendAccessibility)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
var onResend: () -> Unit?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val view: UIView

The UIKit view to embed. Size it with sizeThatFits(_:); it spans the proposed width.