Phone Number Feild of SwiftUI
Dec 6, 2024
This is a phone number feild of wsiftUI that I implemented mysqlf, you can use ti in your APP.
Press enter or click to view image in full size![]()
Press enter or click to view image in full size![]()
Press enter or click to view image in full size![]()
First, you need a json file containing all country codes, as show below:
[{
"id": "0001",
"name": "Afghanistan",
"flag": "🇦🇫",
"code": "AF",
"dial": "+93",
"pattern": "### ### ###",
"limit": 17
}, {
"id": "0003",
"name": "Albania",
"flag": "🇦🇱",
"code": "AL",
"dial": "+355",
"pattern": "## ### ####",
"limit": 17
},
...
]You can download it from here.
Get jiang youhua’s stories in your inbox
Join Medium for free to get updates from this writer.
Second, you need a select list of country codes.
Last, the Field code show below:








