单击按钮时如何显示文本字段

时间:2011-11-18 08:53:27

标签: iphone uitextfield

  

可能重复:
  How to add UITextfield on click of UIButton and make it editable

我想显示UITextField,当单击按钮时,它可以编辑。 如果有人知道,请给我答案。

1 个答案:

答案 0 :(得分:0)

为UIButton创建一个IBAction,如下所示:

-(IBAction)showTextFied:(id)sender{
    yourTextField.editable=YES;//turn to editable mode if it's not
   [yourTextField becomeFirstReponder];//show the keyboard
}
相关问题