AYCountries 1.0.4

AYCountries 1.0.4

Anton Yereshchenko维护。



  • 作者:
  • Anton Yereshchenko

AYCountries

CI Status Version License Platform

示例

要运行示例项目,首先克隆仓库,然后从Example目录运行pod install

关于

包含国旗和电话区号的国家的列表。

一个包含UITableView的单个UIViewController,用于显示可供选择的国家的列表。

安装

AYCountries可通过CocoaPods获取。安装它,只需将以下行添加到Podfile中

inhibit_all_warnings!

target 'YOUR-TARGET-NAME' do
  use_frameworks!
	pod 'AYCountries'
end

用法

// 'country' - object of class 'AYCountry' (selected country).
// 'vc' - object of class 'UIViewController' (countries list).
// 'countriesViewController' - created object of class 'UIViewController' with list of countries.

let countriesViewController = AYCountriesConfigurator.configure { [weak self] country, vc in
  print(country?.name)
  vc.dismiss(animated: true, completion: nil)
}
present(countriesViewController, animated: true, completion: nil)

countriesViewController.fetch(with: Query.name("ukr")) // fetch countries that contains 'ukr' in the name (case insensitive)

作者

Anton Yereshchenko

许可证

AYCountries 在 MIT 许可下可用。有关更多信息,请参阅 LICENSE 文件。