As an added benefit, I have also increased swift tools version to 5.7
// Package.swift
swift-tools-version:5.7
I'm looking forward to your feedback on this enhancement. I believe it's a valuable addition to the library, making it more versatile for usage in diverse design contexts.
Please the sample below & the attached screenshot below:
struct MyView: View {
// MARK: - Properties
@Binding var directInputText: String
@Binding var isEditing: Bool
let placeHolderText: String = "Type something"
// MARK: - Body
var body: some View {
iPhoneNumberField(
// -- Other properties,
insets: UIEdgeInsets(top: 14, left: 16, bottom: 14, right: 16)
) {
$0.textColor = .label
$0.numberPlaceholderColor = .label
}
}
}
I have added support to forward paddings to the internally used
PhoneNumberTextField
.To achieve this I had to add paddings support to the official PhoneNumberTextField which was recently merged and released with PhoneNumberKit version 3.6.6.
On iPhoneNumberField I have simply added the following two params: -
Initilized them with the following default values so that it doesn't break developers code.
and forward them to PhoneNumberKit as follows: -
All other implementations details are handled on the latest version of PhoneNumberKit which have my suggested changes merged via my PR #669.
Since paddings support are available from version 3.6.6 of PhoneNumberKit I have changed the package dependency version as follows: -
As an added benefit, I have also increased swift tools version to 5.7
I'm looking forward to your feedback on this enhancement. I believe it's a valuable addition to the library, making it more versatile for usage in diverse design contexts. Please the sample below & the attached screenshot below: