我正在为我的UITextField显示一个自定义inputView ,如下所示
let inputView = UIView()
let button = UIButton()
inputView.backgroundColor = UIColor.redColor()
inputView.addSubview(button)
let tf = UITextField()
tf.inputView = inputView
现在,当单击按钮时,我希望更改tf (UITextField) 的文本。
换句话说 - 从我的inputView我如何访问父 UITextField ?
谢谢!