1
我正面临着一个奇怪的问题。我用下面的代码创建了UIPicker。我还使用IQKeyboardManager来管理键盘。工具栏和选取器之间的差距?
let datepicker = UIPickerView()
datepicker.frame = CGRect(x: 0, y: -10, width: UIScreen.main.bounds.width, height: 200)
datepicker.backgroundColor = Constants.Colors.blue
datepicker.tintColor = UIColor.white
textfieldDropDown.inputView = datepicker
textfieldDropDown.inputView?.autoresizingMask = .flexibleHeight
datepicker.delegate = self
datepicker.reloadAllComponents()
临时溶液 如果我将高度设置为220,然后它不显示,因为更多的高度的任何间隙。
请告诉我这个最好的解决方案?
感谢,但这并没有为我工作,所以我所做的是增加高度 – Techiee