Update CHANGELOG.md
pod 'GCCountryPicker'
Add GCCountryPicker to your file’s import statements.
import GCCountryPicker
Create an instance of GCCountryPickerViewController.
let countryPickerViewController = GCCountryPickerViewController(displayMode: .withoutCallingCodes)
Set the delegate, data source (optional), and navigation title.
countryPickerViewController.delegate = self countryPickerViewController.dataSource = self countryPickerViewController.navigationItem.title = "Countries"
Embed the country picker view controller in a navigation controller.
let navigationController = UINavigationController(rootViewController: countryPickerViewController)
Present the navigation controller.
self.present(navigationController, animated: true, completion: nil)
Implement GCCountryPickerDelegate.
func countryPickerDidCancel(_ countryPicker: GCCountryPickerViewController) func countryPicker(_ countryPicker: GCCountryPickerViewController, didSelectCountry country: GCCountry)
Implement GCCountryPickerDataSource if necessary.
func countryCodes(for countryPicker: GCCountryPickerViewController) -> [String]
Classes
Enumerations
Protocols
GCCountryPicker is available under the MIT license. See the LICENSE file for more info.
版权所有:中国计算机学会技术支持:开源发展技术委员会 京ICP备13000930号-9 京公网安备 11010802032778号
CocoaPods
Implementation
Add GCCountryPicker to your file’s import statements.
Create an instance of GCCountryPickerViewController.
Set the delegate, data source (optional), and navigation title.
Embed the country picker view controller in a navigation controller.
Present the navigation controller.
Implement GCCountryPickerDelegate.
Implement GCCountryPickerDataSource if necessary.
Documentation
Classes
Enumerations
Protocols
License
GCCountryPicker is available under the MIT license. See the LICENSE file for more info.