FloatingLabelTextFieldSwiftUI icon indicating copy to clipboard operation
FloatingLabelTextFieldSwiftUI copied to clipboard

Binding<Int>

Open nicobelo91 opened this issue 3 years ago • 1 comments

In the example, how would you make it work if the mobile number where an Integer instead of a String?

nicobelo91 avatar Sep 01 '21 15:09 nicobelo91

@nicobelo91 You can use Binding<Int>.init { "\(intField)" } set: { value in intField = Int(value) }

husbig avatar Oct 20 '21 19:10 husbig