CallingCodesKit
示例
要运行示例项目,首先克隆仓库,然后在示例目录中运行 pod install
需求
安装
CallingCodesKit可以通过 CocoaPods 获得。要安装它,只需将以下行添加到您的Podfile中
pod 'CallingCodesKit'
用法
import CountriesCallingCodes
class ViewController: UIViewController, callingCodeData {
@IBOutlet weak var textLabel : UILabel!
func countryCodeAndFlag(name: String, flag: String, code: String, dialCode: String) {
textLabel.text = "\(flag) \(name) \(dialCode)"
}
@objc func callingCodeVC(){
let vc = CallingCodesVC()
vc.delegate = self
navigationController?.pushViewController(vc, animated: true)
}
override func viewDidLoad() {
super.viewDidLoad()
let tap = UITapGestureRecognizer(target: self, action: #selector(callingCodeVC))
textLabel.addGestureRecognizer(tap)
}
}
截图
作者
imranrasheeddeveloper, [email protected]
许可证
CallingCodesKit 在 MIT 许可证下可用。有关更多信息,请参阅 LICENSE 文件。