提问人:Supreet Patil 提问时间:4/20/2020 最后编辑:DilanSupreet Patil 更新时间:7/5/2023 访问量:1256
使用countrypickerview,我只想在文本字段的左侧显示电话号码而不是标志
Using countrypickerview ,I want to display only the phonecode not the flag in the left side of text field
问:
默认情况下,此库显示国旗、国家/地区代码和电话代码。我能够删除国家代码,但不能删除国旗。
Let cpv = CountryPickerview(frame: CGRect(x: 0, y: 0,width: 120,height:20))
UserNumber.leftView =cpv
UserNumber.leftView =.always
cpv.showCountryCodeInView = false
答:
0赞
Chitra
7/5/2023
#1
从 storybaord 创建一个 IBOutlet,将视图的宽度设置为等于 50:
@IBOutlet weak var vwCountryPicker: CountryPickerView!
并设置以下值:
vwCountryPicker.flagSpacingInView = -30
vwCountryPicker.flagImageView.isHidden = true
评论