You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello @posix88 i am new to swift and ios. I want to implement this otp text field in my verfication view controller programatically. Do you have any example for this it will be help ful.
Following code i have tried
`
lazy var newVerification: VerificationCodeView = {
let vv = VerificationCodeView()
vv.translatesAutoresizingMaskIntoConstraints = false
what this lines means "declare it as placeholder (the view will resize at runtime following labels dimensions)." because i am getting error of label size which says found nil while unwrapping optionals.
Activity
d33pak-s1ngh commentedon Jun 5, 2018
what this lines means "declare it as placeholder (the view will resize at runtime following labels dimensions)." because i am getting error of label size which says found nil while unwrapping optionals.
d33pak-s1ngh commentedon Jun 5, 2018
getting error in following function
public func setLabelNumber(_ numberOfLabel: Int) { guard numberOfLabel > 0 else { return } labelContainer.spacing = labelSpacing > 0 ? labelSpacing : 10 self.numberOfLabel = numberOfLabel calculateViewWidth() addLabelsToStackView() }posix88 commentedon Jun 5, 2018
hi @d33pak-s1ngh,
about this issue:
#1 (comment)
you have to declare the width constraint as placeholder, you can do easily selecting you constraint and opening the size inspector tab on the right.
I'm sorry but right now the library is designed to be loaded from a xib and not programatically.