使用countrypickerview,我只想显示电话代码,不显示文本字段左侧的标志

问题描述 投票:0回答:1

默认情况下,该库显示国家标志,国家代码和电话代码。我可以删除国家代码,但不能删除标志。

Let cpv = CountryPickerview(frame: CGRect(x: 0, y: 0,width: 120,height:20))
UserNumber.leftView =cpv
UserNumber.leftView =.always
cpv.showCountryCodeInView = false
swift swift3 swift2 cocoapods swift4.2
1个回答
0
投票

如果检查库,还有一些方法,例如方法和属性https://github.com/kizitonwose/CountryPickerView#countrypickerview-properties

我以前没有使用过图书馆,但我想是

func cellImageViewSize(in countryPickerView: CountryPickerView) -> CGSize{
    return 0
}

应解决您的问题。

© www.soinside.com 2019 - 2024. All rights reserved.