Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在屏幕上有 4 个文本字段。考虑所有文本字段中都有一些文本。当我关注/单击任何文本字段时,先前在文本字段中输入的值会消失。我该如何限制这种行为?有任何想法吗?
谢谢,TF
检查界面生成器。有一个设置为“编辑前清除字段”(或类似的东西)。
如果您不使用 Interface Builder,您可以在文档中找到负责此行为的属性的名称。
编辑:我帮你查了。该属性被称为
clearsOnBeginEditing