Skip to content

Instantly share code, notes, and snippets.

@blsage
Last active November 6, 2020 22:40
Show Gist options
  • Save blsage/7fd9d51021ed60ffbda5ac39e68abe99 to your computer and use it in GitHub Desktop.
Save blsage/7fd9d51021ed60ffbda5ac39e68abe99 to your computer and use it in GitHub Desktop.
FORMAT PHONE NUMBERS IN SWIFTUI
import SwiftUI
import iPhoneNumberField
struct ContentView: View {
@State var text = ""
var body: some View {
iPhoneNumberField("Phone", text: $text)
}
}
@blsage
Copy link
Author

blsage commented Nov 6, 2020

iPhoneNumberField ☎️

Format phone numbers as they're typed—entirely in SwiftUI. 📱

And it's as easy as

iPhoneNumberField("Phone", text: $text)

Import instructions: https://github.com/MojtabaHs/iPhoneNumberField

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment