可能重复:
How to add UITextfield on click of UIButton and make it editable
我想显示UITextField,当单击按钮时,它可以编辑。 如果有人知道,请给我答案。
答案 0 :(得分:0)
为UIButton创建一个IBAction,如下所示:
-(IBAction)showTextFied:(id)sender{
yourTextField.editable=YES;//turn to editable mode if it's not
[yourTextField becomeFirstReponder];//show the keyboard
}