Created
October 20, 2020 17:45
-
-
Save blsage/6204d3faa8dbbbe6bacce4ab389153df to your computer and use it in GitHub Desktop.
Quickly implement a text field designed for phone numbers. 📱🔢
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import SwiftUI | |
import iPhoneNumberTextField | |
struct ContentView: View { | |
@State var text: String = "" | |
@State var isEditing: Bool = false | |
var body: some View { | |
iPhoneNumberTextField("Placeholder", | |
text: $text, | |
isEditing: $isEditing) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Phone number text field for SwiftUI
Format the user's phone number as they type it, entirely in SwiftUI 📱🔢
iPhoneNumberTextField
has three required parameters: 1️⃣ a placeholder, 2️⃣ a text binding, and 3️⃣ an isEditing binding.iPhoneNumberTextField
also supports a variety of modifiers.See more here 👉