AJCountryPicker2 2.0.0

AJCountryPicker2 2.0.0

测试已测试
Lang语言 SwiftSwift
许可 MIT
Released最后发布2016年12月
SwiftSwift 版本3.0
SPM支持 SPM

Eddie Lau 维护。



  • Aj Mehra

AJCountryPicker

AJCountryPicker 是一个用于选择国家代码和旗帜的 Swift 库。

特性

  • [x] 国家旗帜
  • [x] 国家代码
  • [x] 国家区号
  • [x] 国家名称
  • [x] 可选择国家的颜色栏
  • [x] 可选择国家的代理

安装

嵌入式框架要求 iOS 8 或 OS X Mavericks(10.9)及更高版本的最低部署目标。

演示

在您的控制台中执行 pod try AJCountryPicker,并运行项目来尝试演示。

基本用法

let countryCodePicker = AJCountryPicker { country, code in
            print(country, code)
        }

// To get current country with calling code
let country = countryCodePicker.currentCountryWithCallingCode
print("country name :- ", country.$0)
print("country calling Code :- ", country.$1)

 // Display calling codes
countryCodePicker.showCallingCodes = true
 // Closure to show country details
countryCodePicker.countryWithCodeAndCallingCode = { name, code, dialCode in
    print("country calling Code :- ", dialCode)
}
navigationController?.pushViewController(countryCodePicker, animated: true)

许可

AJCountryPicker 在 MIT 许可下发布。有关详细信息,请参阅 LICENSE。