- iOS 10.0+
- Xcode 11.0+
- Swift 5.0+
Add this to Podfile
, and then update dependency:
pod 'CountryCodePlugin'
import CountryCodePlugin
let controller = CountryCodeTableViewController.instantiate()
controller.modalPresentationStyle = .fullScreen
controller.delegate = self
controller.language = .TW
present(controller, animated: true, completion: nil)
// Implements CountryCodeDeledate
// Callback after user selection
func countryCodeDidSelect(code: String, name: String) {
}
// You can custom the layout of cell (Optional)
func makeCountryCodeCell(cell: UITableViewCell, code: String, name: String) -> UITableViewCell {
return cell
}
- English
- Traditional Chinese
- Custom cell
- Text search
- Pictures of national flag
- Grouping for cell