【问题标题】:How to display the textfield when click on the button [duplicate]单击按钮时如何显示文本字段[重复]
【发布时间】:2011-11-18 08:53:26
【问题描述】:

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

我想显示当单击按钮时变为可编辑的 UITextField。 有知道的请给我答案。

【问题讨论】:

  • 你想在同一个uiview上显示吗?

标签: iphone uitextfield


【解决方案1】:

像这样为 UIButton 创建一个 IBAction:

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

【讨论】:

  • 不客气..如果有用,请记住接受答案。请记住,您应该使用谷歌(或 SO 搜索)来找到此类问题的解决方案......并阅读文档......干杯
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2013-04-11
  • 2020-08-16
  • 1970-01-01
  • 1970-01-01
  • 2012-05-23
相关资源
最近更新 更多