MRSelectCountry
为 iOS 开发者提供一个简单的方法来获取包括国家名称和区号的国家数据
屏幕截图
要求
- iOS 10.0+
安装
CocoaPods (推荐使用)
# For latest release in cocoapods
pod 'MRSelectCountry'
CocoaPods
不使用- 为什么不使用 CocoaPods?
- 将所有文件从 /MRSelectCountry/MRSelectCountry/ 拖到您的项目中,该文件包含 .json, .swift 和 .storyboard 文件
如何使用
let controller = MRSelectCountry.getMRSelectCountryController(delegate: self)
self.navigationController?.pushViewController(controller, animated: true)
代理方法
您可以使用 MRSelectCountryDelegate
获取所选国家
func didSelectCountry(controller: MRSelectCountryTableViewController, country: MRCountry) {
// Get country data
print(country.description)
// Dismiss/Pop the MRSelectCountryTableViewController
controller.navigationController?.popViewController(animated: true)
}
问题和帮助
使用 问题 来提问。在提问之前,请查看问题是否已经得到解答
许可证
MRSelectCountry
发布在 MIT 许可证 下
请提供引用信息,将非常感谢