视频未显示,代码如下所示
dash
答案 0 :(得分:1)
Make the ViewController
the delegate of your textField
and implement this method.
func textFieldShouldBeginEditing(_ textField: UITextField) -> Bool {
/*
* Add your view as a subview
*/
return false
}
答案 1 :(得分:0)
let myTFrame = CGRectMake(0, 0, DC.screenWidth/2-53, 30)
myT = UITextField(frame: myTFrame)
myT.delegate = self
myT.textAlignment = .Right
myT.text = "תת קטגוריה"
myT.textColor = .grayColor()
myT.delegate = self
tempView.frame = CGRectMake(0, 0, 320, 256)
myT.inputView = tempView
view.addSubview(myT)