自定义UITextField,右侧有箭头

时间:2016-01-26 12:03:17

标签: ios swift uitextfield

我有UITextField显示SpinnerView,所以我想通过添加指向右侧底部的箭头来自定义它们,怎么办?我正考虑在右侧添加UIImageView,但我不知道它们是否是另一种解决方案。

NSNotificationCenter.defaultCenter().addObserver(self, selector: ("updatePicker"), name: UITextFieldTextDidBeginEditingNotification, object: nil)

let pickerView = UIPickerView(frame: CGRectMake(0, 200, view.frame.width, 400))

//        pickerView.backgroundColor = .whiteColor()

pickerView.showsSelectionIndicator = true
pickerView.delegate = self
pickerView.dataSource = self
self.pickerView = pickerView

tfProjet.inputView = pickerView

0 个答案:

没有答案